...
But this does not work because:
Line item configurator “test” is created during syntax check.
During syntax check,
api.input
returns only mock data, not real data.During syntax check (and only during syntax check),
api.getParameter("test")
returns a context parameter of the "test" configurator. During recalculation (when syntax check is not running),api.getParameter("test")
returns null.ConfA?.setValue in syntax check:
has a context parameter of the configurator;
does not have a value loaded from
api.input
.
ConfA?.setValue when quote is recalculated:
does not have a context parameter of the configurator;
has a value loaded from
api.input
, but it cannot be set as confA is null.
As a result:
You can set a static value via
confA.setValue()
as a value which is known at syntax check.You cannot set dynamically loaded data from the header configurator because in the syntax check
api.input
does not return the expected value and during recalculation,api.getParameters("test")
does not return the context parameter of the configurator.
...