Common behavior
...
If the name of a dynamic variable is also used in a variable definition in the <variables> section it is always used to set a default value of the dynamic variable with the same name rather than unsetting it during refreshing if there are no further conditions matching in the <dynamicvariables> section for that variable. For comparison with the <variables> section - a dynamic variable behaves exactly like a "normal" IzPack variable with a static key-value pair if it has set the attribute checkonce="true"
.
An IzPack installer refreshes dynamic variables on each panel change, which subsequently might affect a whole chain of conditions from the <conditions> section depending on these variables.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<dynamicvariables> <variable name="thechoice" value="fallback value" /> <variable name="thechoice" value="choice1" condition="cond1" /> <variable name="thechoice" value="choice2" condition="cond2" /> </dynamicvariables> |
For comparison with the <variables> section - a dynamic variable behaves exactly like a "normal" IzPack variable with a static key-value pair if it has set the attribute checkonce="true".
It can be still overridden A dynamic variable is overridden, if there is another dynamic variable definition for of the same key, which evaluates later based on a different conditionname after that one, refreshing sets the values in the order of definition..
Lifecycle states
Since: 5.0.0 RC5
...
- unset
If unset, the variable is defined but does not have any active value and is invisible during the installation process.
A variable can be defined and unset also if it depends on a condition which at the given time evaluates false, and there is no second definition of the same variable setting it. - set
If set, the variable has an active value, which can be still changed during panel changes depending on changing variable conditions.
If a variable is defined more times it gets evaluated in the order of definition, thus, the last definition applying at the given time has precedence. - frozen
During being frozen, the variable value cannot be changed during refresh.
...
In addition, if the user goes back through the panel sequence by pressing Previous, they must reach the first panel containing the variable before it will be unfrozen.
In this way, the variables can be reset to the proper values based on new conditions when the user navigates backward and forward multiple times and inputs new choices.
Global precedence for dynamic variable assignments
...