Class GenericSaveFormData

    • Constructor Detail

      • GenericSaveFormData

        public GenericSaveFormData()
    • Method Detail

      • addRequestValue

        public void addRequestValue​(String fieldName,
                                    List<String> fieldValues)
      • 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 interface IFormDataAdapter
        Overrides:
        getNormName in class ASaveFormData
        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, 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.