Package de.xima.fc.mdl.savedata
Class GenericSaveFormData
java.lang.Object
de.xima.fc.mdl.savedata.ASaveFormData
de.xima.fc.mdl.savedata.GenericSaveFormData
- All Implemented Interfaces:
IFormDataAdapter
,Serializable
- See Also:
-
Field Summary
FieldsFields inherited from class de.xima.fc.mdl.savedata.ASaveFormData
aliasFieldMap, dynContainerMap, dynFieldSet, fieldAliasMap, fieldContainerMap, fieldMetaDataMap, fieldNotesRead, fieldNotesUnread, fieldValuesMap, metaDataMap, questionFieldSet, requestDataMap, sendElements
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRequestValue
(String fieldName, List<String> fieldValues) getNormName
(String fieldName) For each element, a name is defined in the designer.void
init
(Map<String, List<String>> dataMap, Map<String, List<org.apache.commons.fileupload.FileItem>> uploadMap, List<String> sendElements) void
mergeRequestData
(Map<String, List<String>> oldRequestData) This method is called when a form record exists already and the form was submitted again.void
Methods inherited from class de.xima.fc.mdl.savedata.ASaveFormData
addMultiValue, addSingleValue, aliasValue, asStringValue, asStringValue, getAliasFieldMap, getDynContainerMap, getDynFieldSet, getFieldAlias, getFieldAliasMap, getFieldMetaData, getFieldMetaDataMap, getFieldNotesRead, getFieldNotesUnread, getFields, getFieldTyp, getFieldValues, getFieldValuesMap, getIFieldMetaData, getMetaDataMap, getRequestDataMap, getStringValue, hasAlias, hasField, isElementLooped, isQuestionElement, loopCount, normalizeValue, normalizeValue, normalizeValues, resolveAliasName, resolveDynValueName, resolveFieldAlias, resolveFieldName, resolveFieldType, updateContainerElements, updateValuesMap, valuesMapHasValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.xima.fc.interfaces.form.IFormDataAdapter
createCompleteDynContainerMap, init, init, init
-
Field Details
-
MATCHER_DYNAMIC_FIELD
Deprecated.- See Also:
-
MATCHER_DYNAMIC_CONTAINER
Deprecated.- See Also:
-
-
Constructor Details
-
GenericSaveFormData
public GenericSaveFormData()
-
-
Method Details
-
addRequestValue
-
init
-
getNormName
Description copied from interface:IFormDataAdapter
For each element, a name is defined in the designer. When the element is marked as a repeated elements, the created elements get a name that consists of the original name and a suffix. This method takes a name that may contain such a suffix and returns the original form element name.- Specified by:
getNormName
in interfaceIFormDataAdapter
- Overrides:
getNormName
in classASaveFormData
- Parameters:
fieldName
- A form element that may contain suffixes such as the suffix for repeated elements.- Returns:
- The given name, normalized to the form element name as defined in the designer.
-
getSendElements
- Returns:
- A
Set
of all elements for which a value was submitted in the (usually POST) request.
-
removeEmptyContainers
public void removeEmptyContainers() -
mergeRequestData
This method is called when a form record exists already and the form was submitted again. This method takes the old request data sent when the form was submitted previously; and merges that data into the values that were submitted now. This is done because some form elements could be disabled when the form is submitted again, which means their values are not transmitted. If they were not disabled originally, not merging the two data sets would result in a loss of data.This method modifies the state of this SaveFormData object.
- Parameters:
oldRequestData
- A set of form element values to be merged into this form data set.
-
FD2Const.MATCHER_DYNAMIC_CONTAINER