Class XForm
java.lang.Object
de.xima.fc.form.common.models.XForm
- All Implemented Interfaces:
IXForm, Serializable, Cloneable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHiddenInputParameter(String key, String value) clone()Deprecated.com.alibaba.fastjson.JSONObjectDeprecated.Deprecated.Deprecated.Deprecated.com.alibaba.fastjson.JSONArrayRetrieves the list of all variables (hidden input fields) that are present in the form.com.alibaba.fastjson.JSONObjectDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanbooleanDeprecated.booleanDeprecated.voidsetHiddenInputParameter(Map<String, String> hiddenInputParameter) voidsetParentIdMap(Map<String, String> parentItemMap) voidsetParentItemMap(LinkedHashMap<String, String> parentItemMap) Deprecated.voidsetReadOnlyCondItems(List<String> readOnlyCondItems) voidsetRenderCondItems(List<String> renderCondItems) voidsetServerValItems(List<String> serverValItems) voidsetxItems(LinkedHashMap<String, XItem> xItems) Deprecated.voidsetXItems(LinkedHashMap<String, XItem> xItems)
-
Constructor Details
-
XForm
public XForm()Creates an empty form with no form elements. -
XForm
public XForm(com.alibaba.fastjson.JSONObject persist) throws com.alibaba.fastjson.JSONException Creates a new XForm from the given JSON persist object.- Parameters:
persist- The JSON object representing the form persist.- Throws:
com.alibaba.fastjson.JSONException- When the persist JSON contains an invalid data structure.
-
-
Method Details
-
setXItems
-
getXItems
-
getHiddenInputParameter
- Specified by:
getHiddenInputParameterin interfaceIXForm
-
setHiddenInputParameter
- Specified by:
setHiddenInputParameterin interfaceIXForm
-
addHiddenInputParameter
- Specified by:
addHiddenInputParameterin interfaceIXForm
-
getServerValItems
- Specified by:
getServerValItemsin interfaceIXForm
-
getReadOnlyCondItems
- Specified by:
getReadOnlyCondItemsin interfaceIXForm
-
getRenderCondItems
- Specified by:
getRenderCondItemsin interfaceIXForm
-
setServerValItems
- Specified by:
setServerValItemsin interfaceIXForm
-
setReadOnlyCondItems
- Specified by:
setReadOnlyCondItemsin interfaceIXForm
-
setRenderCondItems
- Specified by:
setRenderCondItemsin interfaceIXForm
-
getParentItemMap
Deprecated.- Specified by:
getParentItemMapin interfaceIXForm- Returns:
- Map from the ID of a form item to the ID of its parent (if any).
-
getParentIdMap
- Specified by:
getParentIdMapin interfaceIXForm- Returns:
- Map from the ID of a form item to the ID of its parent (if any).
-
setParentIdMap
- Specified by:
setParentIdMapin interfaceIXForm- Parameters:
parentItemMap- Map from the ID of a form item to the ID of its parent (if any).
-
setParentItemMap
Deprecated.- Specified by:
setParentItemMapin interfaceIXForm- Parameters:
parentItemMap- Map from the ID of a form item to the ID of its parent (if any).
-
isShowLogo
public boolean isShowLogo()- Specified by:
isShowLogoin interfaceIXForm
-
getVersion
public com.alibaba.fastjson.JSONObject getVersion()- Specified by:
getVersionin interfaceIXForm
-
getVariables
public com.alibaba.fastjson.JSONArray getVariables()Description copied from interface:IXFormRetrieves the list of all variables (hidden input fields) that are present in the form. Each variable is a JSON object with the following properties:- aliasname - Alias of the variable, which can be used e.g. in placeholders instead of the name and allows all characters.
- name - The name of the variable, which is also the name of the hidden input field. It only allows certain characters (digits, letters, underscore)
- serveronly - Whether the variable exists only on the server.
- value - The default value of the variable.
- Specified by:
getVariablesin interfaceIXForm- Returns:
- A list of all variables.
-
getMetaData
- Specified by:
getMetaDatain interfaceIXForm
-
getUserCSS
- Specified by:
getUserCSSin interfaceIXForm
-
getUserJS
-
clone
- Specified by:
clonein interfaceIXForm- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
getFormI18N
public com.alibaba.fastjson.JSONObject getFormI18N()- Specified by:
getFormI18Nin interfaceIXForm
-
getFormProperties
- Specified by:
getFormPropertiesin interfaceIXForm
-
getxItems
Deprecated.usegetXItems() -
setxItems
Deprecated. -
isResponsive
Deprecated.- Specified by:
isResponsivein interfaceIXForm
-
isUseModernTheme
Deprecated.- Specified by:
isUseModernThemein interfaceIXForm- Returns:
trueto use the modern CSS theme,falseto not use it.
-
isPrevReplacement
Deprecated.- Specified by:
isPrevReplacementin interfaceIXForm- Returns:
- Whether to replace placeholders with their values in the preview.
-
getMaxSize
Deprecated.- Specified by:
getMaxSizein interfaceIXForm- Returns:
- Maximum width of the form, as a CSS unit with "px".
-
getMinSize
Deprecated.- Specified by:
getMinSizein interfaceIXForm- Returns:
- Minimum width of the form, as a CSS unit with "px".
-
getResponseSize
Deprecated.- Specified by:
getResponseSizein interfaceIXForm- Returns:
- Responsive width of the form, as a CSS unit with "px".
-
getErrorStyle
Deprecated.- Specified by:
getErrorStylein interfaceIXForm- Returns:
- Style class to apply to the form, which controls how validation errors are displayed.
-
isAttributeW3CMode
Deprecated.- Specified by:
isAttributeW3CModein interfaceIXForm- Returns:
trueto use only attributes allowed by the W3C spec,falseto use the legacy mode.
-
isElementClassNameMode
Deprecated.- Specified by:
isElementClassNameModein interfaceIXForm- Returns:
truewhen the name of the element should be added as a CSS style class,falseotherwise.
-
isValidateSubmitAction
Deprecated.- Specified by:
isValidateSubmitActionin interfaceIXForm- Returns:
truewhen submit buttons should be validated to ensure only existing buttons are pressed.
-
isLegacyUseOptionTextForAutocomplete
Deprecated.- Specified by:
isLegacyUseOptionTextForAutocompletein interfaceIXForm- Returns:
- In versions [7.0.0, 7.4.0) of formcycle there was a bug for autocomplete select fields, where the option text instead of the option was used instead of its value when evaluating conditions. This flag enables this legacy behavior.
-
getXItems()