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
public final class GenericSaveFormData extends ASaveFormData
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
MATCHER_DYNAMIC_CONTAINER
Deprecated.static String
MATCHER_DYNAMIC_FIELD
Deprecated.-
Fields 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 Constructor Description GenericSaveFormData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRequestValue(String fieldName, List<String> fieldValues)
String
getNormName(String fieldName)
For each element, a name is defined in the designer.Set<String>
getSendElements()
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
removeEmptyContainers()
-
Methods inherited from class de.xima.fc.mdl.savedata.ASaveFormData
addMultiValue, addSingleValue, aliasValue, asStringValue, asStringValue, getAliasFieldMap, getDynFieldSets, getFieldAlias, getFieldAliasMap, getFieldNotesRead, getFieldNotesUnread, getFields, getFieldTyp, getFieldValues, getFieldValuesMap, getIDynContainerMap, getIFieldMetaData, getIFieldMetaDataMap, 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, getDynContainerMap, getDynFieldSet, getFieldMetaData, getFieldMetaDataMap, init, init, init
-
-
-
-
Field Detail
-
MATCHER_DYNAMIC_FIELD
@Deprecated public static final String MATCHER_DYNAMIC_FIELD
Deprecated.- See Also:
- Constant Field Values
-
MATCHER_DYNAMIC_CONTAINER
@Deprecated public static final String MATCHER_DYNAMIC_CONTAINER
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Map<String,List<String>> dataMap, Map<String,List<org.apache.commons.fileupload.FileItem>> uploadMap, List<String> sendElements)
-
getNormName
public String getNormName(String fieldName)
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
public Set<String> getSendElements()
- Returns:
- A
Set
of all elements for which a value was submitted in the (usually POST) request.
-
removeEmptyContainers
public void removeEmptyContainers()
-
mergeRequestData
public void mergeRequestData(Map<String,List<String>> oldRequestData)
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, i.e. the client did not transmit new values for these fields. If the fields 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.
-
-