Package de.xima.fc.form.common.models
Class XFormVariableDescriptor
java.lang.Object
de.xima.fc.form.common.models.XFormVariableDescriptor
Wrapper for a variable JSON object from the form persist (
designer.getPersist().variables
). Contains several
methods for accessing the data in a structured manner.- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
ConstructorsConstructorDescriptionXFormVariableDescriptor
(com.alibaba.fastjson.JSONObject variableJson) Wraps a variable JSON object and provides additional methods for accessing the properties of the variable. -
Method Summary
-
Constructor Details
-
XFormVariableDescriptor
public XFormVariableDescriptor(com.alibaba.fastjson.JSONObject variableJson) Wraps a variable JSON object and provides additional methods for accessing the properties of the variable.- Parameters:
variableJson
- Variable JSON object to wrap.
-
-
Method Details
-
getAlias
- Returns:
- The alias of the variable, which provides an alternative way to reference the variable. The
getName()
does not allow special characters.
-
getDefaultValue
- Returns:
- The default value for the variable when a new form record is created.
-
getId
- Returns:
- A string with a unique ID of the variable. Usually this has the format
xi-var-[number]
.
-
getIndex
public long getIndex()- Returns:
- The numerical (0-based) index of the variable.
-
getName
- Returns:
- The name of the variable, which is also the name attribute of the hidden input field.
-
isServerOnly
public boolean isServerOnly()- Returns:
- Whether the variable is available only on the server.
-