Class FormMeta
- java.lang.Object
- 
- com.inductiveautomation.ignition.gateway.localdb.persistence.FormMeta
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<FormMeta>
 
 public class FormMeta extends java.lang.Object implements java.io.Serializable, java.lang.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:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceFormMeta.IExtendedDescriptionSource
 - 
Field SummaryFields Modifier and Type Field Description protected CategorycategoryThe category that the field belongs to.protected booleanenabledControls whether or not the field, if visible, is enabled on an add/edit screenprotected booleanescapeHtmlOnDisplayWhether or not the value of this field should be escaped when displayed.protected SFieldMetafieldprotected java.lang.StringfieldDescriptionKeyprotected java.lang.StringfieldDescriptionKeyAddModeprotected java.lang.StringfieldDescriptionKeyEditModeprotected java.lang.StringfieldNameKeyprotected intfieldOrderThe relative order (within this field's category) that the field should appear.protected booleanrequiredalternate required method.protected booleanshowDefaultWhether or not the field's default value should be shown on an add/edit screenprotected java.util.List<org.apache.wicket.validation.IValidator>validatorsA list of wicket validators that should be applied to the fieldprotected booleanvisibleControls whether or not the field is visible on an add/edit screen
 - 
Constructor SummaryConstructors Constructor Description FormMeta(SFieldMeta field)FormMeta(SFieldMeta field, IEditorSource editorSource)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FormMetaaddValidator(org.apache.wicket.validation.IValidator validator)intcompareTo(FormMeta o)CategorygetCategory()IEditorSourcegetEditorSource()org.apache.wicket.model.IModelgetExtendedDescription(SRecordInstance record)Provided for subclasses to have custom logic to look up any record-specific instructions for a fieldFormMeta.IExtendedDescriptionSourcegetExtendedDescriptionSource()SFieldMetagetField()java.lang.StringgetFieldDescriptionKey()java.lang.StringgetFieldDescriptionKeyAddMode()java.lang.StringgetFieldDescriptionKeyEditMode()java.lang.StringgetFieldNameKey()intgetFieldOrder()java.util.List<org.apache.wicket.validation.IValidator>getValidators()org.apache.wicket.markup.html.form.FormComponentinstallValidators(org.apache.wicket.markup.html.form.FormComponent c)booleanisEnabled()booleanisEscapeHTMLOnDisplay()booleanisRequired()booleanisShowDefault()booleanisVisible()org.apache.wicket.ComponentnewEditorComponent(java.lang.String id, RecordEditMode mode, SRecordInstance record)FormMetasetCategory(Category category)FormMetasetCategory(java.lang.String displayKey, int order)FormMetasetEditorSource(IEditorSource editorSource)FormMetasetEnabled(boolean enabled)FormMetasetEscapeHTMLOnDisplay(boolean escapeHtmlOnDisplay)FormMetasetExtendedDescriptionSource(FormMeta.IExtendedDescriptionSource extendedDescriptionSource)FormMetasetFieldDescriptionKey(java.lang.String fieldDescriptionKey)FormMetasetFieldDescriptionKeyAddMode(java.lang.String fieldDescriptionKeyAddMode)FormMetasetFieldDescriptionKeyEditMode(java.lang.String fieldDescriptionKeyEditMode)FormMetasetFieldNameKey(java.lang.String fieldNameKey)FormMetasetFieldOrder(int fieldOrder)FormMetasetRequired(boolean required)Normally, a field is marked as required by using the SMANDATORY field flag.FormMetasetShowDefault(boolean showDefault)FormMetasetVisible(boolean visible)java.lang.StringtoString()
 
- 
- 
- 
Field Detail- 
fieldprotected SFieldMeta field 
 - 
fieldNameKeyprotected java.lang.String fieldNameKey 
 - 
fieldDescriptionKeyprotected java.lang.String fieldDescriptionKey 
 - 
fieldDescriptionKeyAddModeprotected java.lang.String fieldDescriptionKeyAddMode 
 - 
fieldDescriptionKeyEditModeprotected java.lang.String fieldDescriptionKeyEditMode 
 - 
showDefaultprotected boolean showDefault Whether or not the field's default value should be shown on an add/edit screen
 - 
visibleprotected boolean visible Controls whether or not the field is visible on an add/edit screen
 - 
enabledprotected boolean enabled Controls whether or not the field, if visible, is enabled on an add/edit screen
 - 
requiredprotected boolean required alternate required method. see setter docs.
 - 
escapeHtmlOnDisplayprotected boolean escapeHtmlOnDisplay Whether or not the value of this field should be escaped when displayed.
 - 
fieldOrderprotected 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.
 - 
validatorsprotected java.util.List<org.apache.wicket.validation.IValidator> validators A list of wicket validators that should be applied to the field
 - 
categoryprotected Category category The category that the field belongs to.
 
- 
 - 
Constructor Detail- 
FormMetapublic FormMeta(SFieldMeta field) 
 - 
FormMetapublic FormMeta(SFieldMeta field, IEditorSource editorSource) 
 
- 
 - 
Method Detail- 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
getFieldpublic SFieldMeta getField() 
 - 
addValidatorpublic FormMeta addValidator(org.apache.wicket.validation.IValidator validator) 
 - 
getValidatorspublic java.util.List<org.apache.wicket.validation.IValidator> getValidators() 
 - 
isVisiblepublic boolean isVisible() 
 - 
setVisiblepublic FormMeta setVisible(boolean visible) 
 - 
isRequiredpublic boolean isRequired() 
 - 
setRequiredpublic 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.
 - 
getCategorypublic Category getCategory() 
 - 
setCategorypublic FormMeta setCategory(java.lang.String displayKey, int order) 
 - 
getFieldOrderpublic int getFieldOrder() 
 - 
setFieldOrderpublic FormMeta setFieldOrder(int fieldOrder) 
 - 
getFieldNameKeypublic java.lang.String getFieldNameKey() 
 - 
setFieldNameKeypublic FormMeta setFieldNameKey(java.lang.String fieldNameKey) 
 - 
getFieldDescriptionKeypublic java.lang.String getFieldDescriptionKey() 
 - 
setFieldDescriptionKeypublic FormMeta setFieldDescriptionKey(java.lang.String fieldDescriptionKey) 
 - 
getExtendedDescriptionpublic 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
 - 
newEditorComponentpublic org.apache.wicket.Component newEditorComponent(java.lang.String id, RecordEditMode mode, SRecordInstance record)
 - 
getEditorSourcepublic IEditorSource getEditorSource() 
 - 
setEditorSourcepublic FormMeta setEditorSource(IEditorSource editorSource) 
 - 
isShowDefaultpublic boolean isShowDefault() 
 - 
setShowDefaultpublic FormMeta setShowDefault(boolean showDefault) 
 - 
installValidatorspublic org.apache.wicket.markup.html.form.FormComponent installValidators(org.apache.wicket.markup.html.form.FormComponent c) 
 - 
compareTopublic int compareTo(FormMeta o) - Specified by:
- compareToin interface- java.lang.Comparable<FormMeta>
 
 - 
getFieldDescriptionKeyAddModepublic java.lang.String getFieldDescriptionKeyAddMode() 
 - 
setFieldDescriptionKeyAddModepublic FormMeta setFieldDescriptionKeyAddMode(java.lang.String fieldDescriptionKeyAddMode) 
 - 
getFieldDescriptionKeyEditModepublic java.lang.String getFieldDescriptionKeyEditMode() 
 - 
setFieldDescriptionKeyEditModepublic FormMeta setFieldDescriptionKeyEditMode(java.lang.String fieldDescriptionKeyEditMode) 
 - 
getExtendedDescriptionSourcepublic FormMeta.IExtendedDescriptionSource getExtendedDescriptionSource() 
 - 
setExtendedDescriptionSourcepublic FormMeta setExtendedDescriptionSource(FormMeta.IExtendedDescriptionSource extendedDescriptionSource) 
 - 
isEnabledpublic boolean isEnabled() 
 - 
setEnabledpublic FormMeta setEnabled(boolean enabled) 
 - 
isEscapeHTMLOnDisplaypublic boolean isEscapeHTMLOnDisplay() 
 - 
setEscapeHTMLOnDisplaypublic FormMeta setEscapeHTMLOnDisplay(boolean escapeHtmlOnDisplay) 
 
- 
 
-