Global variables can be stored as follows:
A global variable is a substitute symbol, which can be set respectively and deleted at any time by an application that uses JAXFront.
A variable is always defined by a key and string value.
Variables, held per DOM, can be set on the JAXFront-DOM-instance by com.jaxfront.dom.Document.setUserProperty(String key, String value).
To use globally defined variables in the XUI definition:
Example:
<propertyChange> <formulaExpression>"The current email will be inserted here: $(USER_EMAIL)" </formulaExpression> </propertyChange> |
At run-time, the variable USER_EMAIL is replaced with the set value.
If the variables are DOM independent, they can be defined with the same method, JAXFrontProperties.getInstance().setUserProperty(String key, String value).