Class ModelFormField


  • public class ModelFormField
    extends Object
    Models the <field> element.
    See Also:
    widget-form.xsd
    • Method Detail

      • getAttributeName

        public String getAttributeName()
        Gets the name of the Service Attribute (aka Parameter) that corresponds with this field. This can be used to get additional information about the field. Use the getServiceName() method to get the Entity name that the field is in.
        Returns:
        returns the name of the Service Attribute
      • getCurrentContainerId

        public String getCurrentContainerId​(Map<String,​Object> context)
        Gets the current id name of the ModelFormField and if in a multi type ModelForm, suffixes it with the index row.
        Parameters:
        context -
        Returns:
      • getEncodeOutput

        public boolean getEncodeOutput()
      • getEntityName

        public String getEntityName()
      • getEntry

        public String getEntry​(Map<String,​? extends Object> context)
        Gets the entry from the context that corresponds to this field; if this form is being rendered in an error condition (ie isError in the context is true) then the value will be retrieved from the parameters Map in the context.
        Parameters:
        context - the context
        Returns:
        returns the entry from the context that corresponds to this field
      • getEntryName

        public String getEntryName()
      • getEvent

        public String getEvent()
      • getFieldInfo

        public FieldInfo getFieldInfo()
      • getFieldName

        public String getFieldName()
        Gets the name of the Entity Field that corresponds with this field. This can be used to get additional information about the field. Use the getEntityName() method to get the Entity name that the field is in.
        Returns:
        return the name of the Entity Field that corresponds with this field
      • getHeaderLink

        public String getHeaderLink()
      • getHeaderLinkStyle

        public String getHeaderLinkStyle()
      • getIdName

        public String getIdName()
        Gets the id name of the ModelFormField that is :
        • The id-name" specified on the field definition
        • Else the concatenation of the formName and fieldName
        Returns:
      • getTabindex

        public String getTabindex()
      • getConditionGroup

        public String getConditionGroup()
      • getMapName

        public String getMapName()
        Get the name of the Map in the form context that contains the entry, available from the getEntryName() method. This entry is used to pre-populate the field widget when not in an error condition. In an error condition the parameter name is used to get the value from the parameters Map.
        Returns:
        returns the name of the Map in the form context that contains the entry
      • getModelForm

        public ModelForm getModelForm()
      • getName

        public String getName()
      • getParameterName

        public String getParameterName​(Map<String,​? extends Object> context)
        Get the name to use for the parameter for this field in the form interpreter. For HTML forms this is the request parameter name.
        Returns:
        returns the name to use for the parameter for this field in the form interpreter
      • getPosition

        public int getPosition()
      • getRedWhen

        public String getRedWhen()
      • getRequiredField

        public boolean getRequiredField()
      • getRequiredFieldStyle

        public String getRequiredFieldStyle()
      • getSeparateColumn

        public boolean getSeparateColumn()
      • getServiceName

        public String getServiceName()
      • getSortField

        public Boolean getSortField()
      • getSortFieldAscStyle

        public String getSortFieldAscStyle()
      • getSortFieldDescStyle

        public String getSortFieldDescStyle()
      • getSortFieldHelpText

        public String getSortFieldHelpText()
      • getSortFieldStyle

        public String getSortFieldStyle()
      • getSortFieldStyleAsc

        public String getSortFieldStyleAsc()
      • getSortFieldStyleDesc

        public String getSortFieldStyleDesc()
      • getTitleAreaStyle

        public String getTitleAreaStyle()
      • getTitleStyle

        public String getTitleStyle()
      • getTooltipStyle

        public String getTooltipStyle()
      • getWidgetAreaStyle

        public String getWidgetAreaStyle()
      • getWidgetStyle

        public String getWidgetStyle()
      • getParentFormName

        public String getParentFormName()
      • isRowSubmit

        public boolean isRowSubmit()
        Checks if field is a row submit field.
      • isSortField

        public boolean isSortField()
      • isUseWhenEmpty

        public boolean isUseWhenEmpty()
      • shouldBeRed

        public boolean shouldBeRed​(Map<String,​Object> context)
        the widget/interaction part will be red if the date value is before-now (for ex. thruDate), after-now (for ex. fromDate), or by-name (if the field's name or entry-name or fromDate or thruDate the corresponding action will be done); only applicable when the field is a timestamp
        Parameters:
        context - the context
        Returns:
        true if the field should be read otherwise false
      • shouldIgnore

        public boolean shouldIgnore​(Map<String,​Object> context)