Package de.xima.fc.form.common.models
Class XForm
java.lang.Object
de.xima.fc.form.common.models.XForm
- All Implemented Interfaces:
IXForm
,Serializable
,Cloneable
Diese Klasse kapselt das Formular-Persist, ermöglicht es dieses mit Werten zu befüllen, zu validieren und
entsprechend zu rendern.
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHiddenInputParameter
(String key, String value) clone()
com.alibaba.fastjson.JSONObject
com.alibaba.fastjson.JSONArray
Retrieves the list of all variables (hidden input fields) that are present in the form.com.alibaba.fastjson.JSONObject
Deprecated.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setHiddenInputParameter
(Map<String, String> hiddenInputParameter) void
setParentItemMap
(LinkedHashMap<String, String> parentItemMap) void
setReadOnlyCondItems
(List<String> readOnlyCondItems) void
setRenderCondItems
(List<String> renderCondItems) void
setServerValItems
(List<String> serverValItems) void
setxItems
(LinkedHashMap<String, XItem> xItems) Deprecated.void
setXItems
(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 Konstruktor mit Formularwerten und Render-Konfiguration- Parameters:
persist
- das Persistance-Objekt des Formulars- Throws:
com.alibaba.fastjson.JSONException
-
-
Method Details
-
setXItems
-
getXItems
-
getHiddenInputParameter
- Specified by:
getHiddenInputParameter
in interfaceIXForm
-
setHiddenInputParameter
- Specified by:
setHiddenInputParameter
in interfaceIXForm
-
addHiddenInputParameter
- Specified by:
addHiddenInputParameter
in interfaceIXForm
-
getServerValItems
- Specified by:
getServerValItems
in interfaceIXForm
-
getReadOnlyCondItems
- Specified by:
getReadOnlyCondItems
in interfaceIXForm
-
getRenderCondItems
- Specified by:
getRenderCondItems
in interfaceIXForm
-
setServerValItems
- Specified by:
setServerValItems
in interfaceIXForm
-
setReadOnlyCondItems
- Specified by:
setReadOnlyCondItems
in interfaceIXForm
-
setRenderCondItems
- Specified by:
setRenderCondItems
in interfaceIXForm
-
getParentItemMap
- Specified by:
getParentItemMap
in interfaceIXForm
-
setParentItemMap
- Specified by:
setParentItemMap
in interfaceIXForm
-
isShowLogo
public boolean isShowLogo()- Specified by:
isShowLogo
in interfaceIXForm
-
isResponsive
public boolean isResponsive()- Specified by:
isResponsive
in interfaceIXForm
-
isUseModernTheme
public boolean isUseModernTheme()- Specified by:
isUseModernTheme
in interfaceIXForm
-
isPrevReplacement
public boolean isPrevReplacement()- Specified by:
isPrevReplacement
in interfaceIXForm
-
getVersion
public com.alibaba.fastjson.JSONObject getVersion()- Specified by:
getVersion
in interfaceIXForm
-
getVariables
public com.alibaba.fastjson.JSONArray getVariables()Description copied from interface:IXForm
Retrieves 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:
getVariables
in interfaceIXForm
- Returns:
- A list of all variables.
-
getMaxSize
- Specified by:
getMaxSize
in interfaceIXForm
-
getMinSize
- Specified by:
getMinSize
in interfaceIXForm
-
getResponseSize
- Specified by:
getResponseSize
in interfaceIXForm
-
getMetaData
- Specified by:
getMetaData
in interfaceIXForm
-
getUserCSS
- Specified by:
getUserCSS
in interfaceIXForm
-
getUserJS
-
getErrorStyle
- Specified by:
getErrorStyle
in interfaceIXForm
-
clone
- Specified by:
clone
in interfaceIXForm
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getxItems
Deprecated.usegetXItems()
-
setxItems
Deprecated. -
getFormI18N
public com.alibaba.fastjson.JSONObject getFormI18N()- Specified by:
getFormI18N
in interfaceIXForm
-
isAttributeW3CMode
public boolean isAttributeW3CMode()- Specified by:
isAttributeW3CMode
in interfaceIXForm
- Returns:
true
to use only attributes allowed by the W3C spec,false
to use the legacy mode.
-
isElementClassNameMode
public boolean isElementClassNameMode()- Specified by:
isElementClassNameMode
in interfaceIXForm
- Returns:
true
when the name of the element should be added as a CSS style class,false
otherwise.
-
isValidateSubmitAction
public boolean isValidateSubmitAction()- Specified by:
isValidateSubmitAction
in interfaceIXForm
- Returns:
true
when submit buttons should be validated to ensure only existing buttons are pressed.
-
isLegacyUseOptionTextForAutocomplete
public boolean isLegacyUseOptionTextForAutocomplete()- Specified by:
isLegacyUseOptionTextForAutocomplete
in 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()