java.lang.Object
com.inductiveautomation.ignition.gateway.localdb.persistence.FormMeta
All Implemented Interfaces:
Serializable, Comparable<FormMeta>

public class FormMeta extends Object implements Serializable, Comparable<FormMeta>
This class encapsulates all of the additional information that we add to each persistent field so that we can automatically create web UIs that deal with the fields.
See Also:
  • Field Details

    • field

      protected SFieldMeta field
    • fieldNameKey

      protected String fieldNameKey
    • fieldDescriptionKey

      protected String fieldDescriptionKey
    • fieldDescriptionKeyAddMode

      protected String fieldDescriptionKeyAddMode
    • fieldDescriptionKeyEditMode

      protected String fieldDescriptionKeyEditMode
    • showDefault

      protected boolean showDefault
      Whether or not the field's default value should be shown on an add/edit screen
    • visible

      protected boolean visible
      Controls whether or not the field is visible on an add/edit screen
    • enabled

      protected boolean enabled
      Controls whether or not the field, if visible, is enabled on an add/edit screen
    • required

      protected boolean required
      alternate required method. see setter docs.
    • escapeHtmlOnDisplay

      protected boolean escapeHtmlOnDisplay
      Whether or not the value of this field should be escaped when displayed.
    • fieldOrder

      protected int fieldOrder
      The relative order (within this field's category) that the field should appear. Lower numbers appear first. Set automatically based on the order that the field is added to the category.
    • validators

      protected List<org.apache.wicket.validation.IValidator> validators
      A list of wicket validators that should be applied to the field
    • category

      protected Category category
      The category that the field belongs to.
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getField

      public SFieldMeta getField()
    • addValidator

      public FormMeta addValidator(org.apache.wicket.validation.IValidator validator)
    • getValidators

      public List<org.apache.wicket.validation.IValidator> getValidators()
    • isVisible

      public boolean isVisible()
    • setVisible

      public FormMeta setVisible(boolean visible)
    • isRequired

      public boolean isRequired()
    • setRequired

      public FormMeta setRequired(boolean required)
      Normally, a field is marked as required by using the SMANDATORY field flag. But sometimes we can't use that flag because it adds a NOT_NULL constraint to the DB, which isn't acceptable for legacy reasons, and so a field can set this flag on the FormMeta in order to still have the UI treat the field as required.
    • getCategory

      public Category getCategory()
    • setCategory

      public FormMeta setCategory(Category category)
    • setCategory

      public FormMeta setCategory(String displayKey, int order)
    • getFieldOrder

      public int getFieldOrder()
    • setFieldOrder

      public FormMeta setFieldOrder(int fieldOrder)
    • getFieldNameKey

      public String getFieldNameKey()
    • setFieldNameKey

      public FormMeta setFieldNameKey(String fieldNameKey)
    • getFieldDescriptionKey

      public String getFieldDescriptionKey()
    • setFieldDescriptionKey

      public FormMeta setFieldDescriptionKey(String fieldDescriptionKey)
    • getExtendedDescription

      public org.apache.wicket.model.IModel getExtendedDescription(SRecordInstance record)
      Provided for subclasses to have custom logic to look up any record-specific instructions for a field
    • newEditorComponent

      public org.apache.wicket.Component newEditorComponent(String id, RecordEditMode mode, SRecordInstance record)
    • getEditorSource

      public IEditorSource getEditorSource()
    • setEditorSource

      public FormMeta setEditorSource(IEditorSource editorSource)
    • isShowDefault

      public boolean isShowDefault()
    • setShowDefault

      public FormMeta setShowDefault(boolean showDefault)
    • installValidators

      public org.apache.wicket.markup.html.form.FormComponent installValidators(org.apache.wicket.markup.html.form.FormComponent c)
    • compareTo

      public int compareTo(FormMeta o)
      Specified by:
      compareTo in interface Comparable<FormMeta>
    • getFieldDescriptionKeyAddMode

      public String getFieldDescriptionKeyAddMode()
    • setFieldDescriptionKeyAddMode

      public FormMeta setFieldDescriptionKeyAddMode(String fieldDescriptionKeyAddMode)
    • getFieldDescriptionKeyEditMode

      public String getFieldDescriptionKeyEditMode()
    • setFieldDescriptionKeyEditMode

      public FormMeta setFieldDescriptionKeyEditMode(String fieldDescriptionKeyEditMode)
    • getExtendedDescriptionSource

      public FormMeta.IExtendedDescriptionSource getExtendedDescriptionSource()
    • setExtendedDescriptionSource

      public FormMeta setExtendedDescriptionSource(FormMeta.IExtendedDescriptionSource extendedDescriptionSource)
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public FormMeta setEnabled(boolean enabled)
    • isEscapeHTMLOnDisplay

      public boolean isEscapeHTMLOnDisplay()
    • setEscapeHTMLOnDisplay

      public FormMeta setEscapeHTMLOnDisplay(boolean escapeHtmlOnDisplay)