Class ModelFormField

  • public class ModelFormField
    extends java.lang.Object
    Models the <field> element.
    See Also:
    • Field Detail

      • module

        public static final java.lang.String module
      • fieldName

        protected final java.lang.String fieldName
      • modelForm

        protected final ModelForm modelForm
      • name

        protected final java.lang.String name
    • Method Detail

      • getAction

        public java.lang.String getAction​(java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • getAttributeName

        public java.lang.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 the name of the Service Attribute
      • getCurrentContainerId

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

        public boolean getEncodeOutput()
      • getEntityName

        public java.lang.String getEntityName()
      • getEntry

        public java.lang.String getEntry​(java.util.Map<java.lang.String,​? extends java.lang.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.
        context - the context
        returns the entry from the context that corresponds to this field
      • getEntry

        public java.lang.String getEntry​(java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                         java.lang.String defaultValue)
      • getEntryName

        public java.lang.String getEntryName()
      • getEvent

        public java.lang.String getEvent()
      • getFieldInfo

        public FieldInfo getFieldInfo()
      • getFieldName

        public java.lang.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.
        return the name of the Entity Field that corresponds with this field
      • getHeaderLink

        public java.lang.String getHeaderLink()
      • getHeaderLinkStyle

        public java.lang.String getHeaderLinkStyle()
      • getIdName

        public java.lang.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
      • getTabindex

        public java.lang.String getTabindex()
      • getConditionGroup

        public java.lang.String getConditionGroup()
      • getMap

        public java.util.Map<java.lang.String,​? extends java.lang.Object> getMap​(java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • getMapAcsr

        public FlexibleMapAccessor<java.util.Map<java.lang.String,​? extends java.lang.Object>> getMapAcsr()
      • getMapName

        public java.lang.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 the name of the Map in the form context that contains the entry
      • getModelForm

        public ModelForm getModelForm()
      • getName

        public java.lang.String getName()
      • getParameterName

        public java.lang.String getParameterName​(java.util.Map<java.lang.String,​? extends java.lang.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 the name to use for the parameter for this field in the form interpreter
      • getPosition

        public int getPosition()
      • getRedWhen

        public java.lang.String getRedWhen()
      • getRequiredField

        public boolean getRequiredField()
      • getRequiredFieldStyle

        public java.lang.String getRequiredFieldStyle()
      • getSeparateColumn

        public boolean getSeparateColumn()
      • getServiceName

        public java.lang.String getServiceName()
      • getSortField

        public java.lang.Boolean getSortField()
      • getSortFieldAscStyle

        public java.lang.String getSortFieldAscStyle()
      • getSortFieldDescStyle

        public java.lang.String getSortFieldDescStyle()
      • getSortFieldHelpText

        public java.lang.String getSortFieldHelpText()
      • getSortFieldHelpText

        public java.lang.String getSortFieldHelpText​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getSortFieldStyle

        public java.lang.String getSortFieldStyle()
      • getSortFieldStyleAsc

        public java.lang.String getSortFieldStyleAsc()
      • getSortFieldStyleDesc

        public java.lang.String getSortFieldStyleDesc()
      • getTitle

        public java.lang.String getTitle​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getTitleAreaStyle

        public java.lang.String getTitleAreaStyle()
      • getTitleStyle

        public java.lang.String getTitleStyle()
      • getTooltip

        public java.lang.String getTooltip​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getTooltipStyle

        public java.lang.String getTooltipStyle()
      • getUseWhen

        public java.lang.String getUseWhen​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getIgnoreWhen

        public java.lang.String getIgnoreWhen​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • getWidgetAreaStyle

        public java.lang.String getWidgetAreaStyle()
      • getWidgetStyle

        public java.lang.String getWidgetStyle()
      • getParentFormName

        public java.lang.String getParentFormName()
      • isRowSubmit

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

        public boolean isSortField()
      • isUseWhenEmpty

        public boolean isUseWhenEmpty()
      • renderFieldString

        public void renderFieldString​(java.lang.Appendable writer,
                                      java.util.Map<java.lang.String,​java.lang.Object> context,
                                      FormStringRenderer formStringRenderer)
      • shouldBeRed

        public boolean shouldBeRed​(java.util.Map<java.lang.String,​java.lang.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
        context - the context
        true if the field should be read otherwise false
      • shouldUse

        public boolean shouldUse​(java.util.Map<java.lang.String,​java.lang.Object> context)
      • shouldIgnore

        public boolean shouldIgnore​(java.util.Map<java.lang.String,​java.lang.Object> context)