Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

As dynamic variables almost completely integrate with static IzPack variables, which means they are mapped to a normal IzPack variable, they can be used as direct variables in user input fields. Take care to have stable evaluation conditions after the user entered a value or use checkonce="true" for this purpose to not override the user value after leaving the panel.

Lifecycle of Dynamic Variables

Each dynamic variable is identified by its unique name.

It is possible to define a dynamic variable more times based on different conditions:

Code Block
languagexml
titleExample
<dynamicvariables>
  <variable name="thechoice" value="choice1" condition="cond1">
  <variable name="thechoice" value="choice2" condition="cond2">
</dynamicvariables>

A dynamic variable behaves like a "normal" IzPack variable with a static key-value pair if it has set the attribute checkonce="true" and an optional condition for its evaluation when it is evaluated.

It can be still overridden if there is another dynamic variable definition for the same key, which evaluates later based on a different condition.

A dynamic variable can lose it's value if it cannot be evaluated any longer from any of the definitions for the same key. It will be reinitialized with a value as soon as at least one dynamic variable definition can be evaluated in some later phase.

Types of Dynamic Variable Assignments

...