Class FormMeta
java.lang.Object
com.inductiveautomation.ignition.gateway.localdb.persistence.FormMeta
- All Implemented Interfaces:
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:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Category
The category that the field belongs to.protected boolean
Controls whether or not the field, if visible, is enabled on an add/edit screenprotected boolean
Whether or not the value of this field should be escaped when displayed.protected SFieldMeta
protected String
protected String
protected String
protected String
protected int
The relative order (within this field's category) that the field should appear.protected boolean
alternate required method.protected boolean
Whether or not the field's default value should be shown on an add/edit screenprotected List<org.apache.wicket.validation.IValidator>
A list of wicket validators that should be applied to the fieldprotected boolean
Controls whether or not the field is visible on an add/edit screen -
Constructor Summary
ConstructorsConstructorDescriptionFormMeta
(SFieldMeta field) FormMeta
(SFieldMeta field, IEditorSource editorSource) -
Method Summary
Modifier and TypeMethodDescriptionaddValidator
(org.apache.wicket.validation.IValidator validator) int
org.apache.wicket.model.IModel
Provided for subclasses to have custom logic to look up any record-specific instructions for a fieldgetField()
int
List<org.apache.wicket.validation.IValidator>
org.apache.wicket.markup.html.form.FormComponent
installValidators
(org.apache.wicket.markup.html.form.FormComponent c) boolean
boolean
boolean
boolean
boolean
org.apache.wicket.Component
newEditorComponent
(String id, RecordEditMode mode, SRecordInstance record) setCategory
(Category category) setCategory
(String displayKey, int order) setEditorSource
(IEditorSource editorSource) setEnabled
(boolean enabled) setEscapeHTMLOnDisplay
(boolean escapeHtmlOnDisplay) setExtendedDescriptionSource
(FormMeta.IExtendedDescriptionSource extendedDescriptionSource) setFieldDescriptionKey
(String fieldDescriptionKey) setFieldDescriptionKeyAddMode
(String fieldDescriptionKeyAddMode) setFieldDescriptionKeyEditMode
(String fieldDescriptionKeyEditMode) setFieldNameKey
(String fieldNameKey) setFieldOrder
(int fieldOrder) setRequired
(boolean required) Normally, a field is marked as required by using the SMANDATORY field flag.setShowDefault
(boolean showDefault) setVisible
(boolean visible) toString()
-
Field Details
-
field
-
fieldNameKey
-
fieldDescriptionKey
-
fieldDescriptionKeyAddMode
-
fieldDescriptionKeyEditMode
-
showDefault
protected boolean showDefaultWhether or not the field's default value should be shown on an add/edit screen -
visible
protected boolean visibleControls whether or not the field is visible on an add/edit screen -
enabled
protected boolean enabledControls whether or not the field, if visible, is enabled on an add/edit screen -
required
protected boolean requiredalternate required method. see setter docs. -
escapeHtmlOnDisplay
protected boolean escapeHtmlOnDisplayWhether or not the value of this field should be escaped when displayed. -
fieldOrder
protected int fieldOrderThe 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
A list of wicket validators that should be applied to the field -
category
The category that the field belongs to.
-
-
Constructor Details
-
FormMeta
-
FormMeta
-
-
Method Details
-
toString
-
getField
-
addValidator
-
getValidators
-
isVisible
public boolean isVisible() -
setVisible
-
isRequired
public boolean isRequired() -
setRequired
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
-
setCategory
-
setCategory
-
getFieldOrder
public int getFieldOrder() -
setFieldOrder
-
getFieldNameKey
-
setFieldNameKey
-
getFieldDescriptionKey
-
setFieldDescriptionKey
-
getExtendedDescription
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
-
setEditorSource
-
isShowDefault
public boolean isShowDefault() -
setShowDefault
-
installValidators
public org.apache.wicket.markup.html.form.FormComponent installValidators(org.apache.wicket.markup.html.form.FormComponent c) -
compareTo
- Specified by:
compareTo
in interfaceComparable<FormMeta>
-
getFieldDescriptionKeyAddMode
-
setFieldDescriptionKeyAddMode
-
getFieldDescriptionKeyEditMode
-
setFieldDescriptionKeyEditMode
-
getExtendedDescriptionSource
-
setExtendedDescriptionSource
public FormMeta setExtendedDescriptionSource(FormMeta.IExtendedDescriptionSource extendedDescriptionSource) -
isEnabled
public boolean isEnabled() -
setEnabled
-
isEscapeHTMLOnDisplay
public boolean isEscapeHTMLOnDisplay() -
setEscapeHTMLOnDisplay
-