public interface I_CmsFormField
A form field consists of a widget for entering values, some metadata like a label text/description, and a set of validators for validating the field.
限定符和类型 | 接口和说明 |
---|---|
static class |
I_CmsFormField.LayoutData
A simple map class containing strings to direct the layout of a form field.
|
static class |
I_CmsFormField.ValidationStatus
An enum which represents the validation status of a field.
|
限定符和类型 | 方法和说明 |
---|---|
void |
bind(I_CmsStringModel model)
Binds a model object to the form field.
|
java.lang.Object |
getDefaultValue()
Returns the default value for the form field.
|
java.lang.String |
getDescription()
The description of the form field, or null if there is no description.
|
java.lang.String |
getId()
Returns the id of this form field, or null if the form field id has not been set.
|
java.lang.String |
getLabel()
The label of the form field, or null if there is no label.
|
I_CmsFormField.LayoutData |
getLayoutData()
Returns the layout data for this field.
|
I_CmsStringModel |
getModel()
Returns the model object for this field.
|
java.lang.String |
getModelId()
Returns the model id.
|
java.lang.String |
getModelValue()
Returns the model value.
|
I_CmsFormField.ValidationStatus |
getValidationStatus()
Returns the validation status of this form field.
|
I_CmsValidator |
getValidator()
Returns the validator for this form field, or null if the field has no validator.
|
I_CmsFormWidget |
getWidget()
Returns the widget used by this form field.
|
void |
setId(java.lang.String id)
Sets the id of this form field.
|
void |
setValidationStatus(I_CmsFormField.ValidationStatus status)
Updates the validation status of this form field.
|
void |
setValidator(I_CmsValidator validator)
Sets the validator for this form field.
|
void |
unbind()
Removes the binding to this form field's model.
|
void bind(I_CmsStringModel model)
model
- the model objectjava.lang.Object getDefaultValue()
java.lang.String getDescription()
java.lang.String getId()
java.lang.String getLabel()
I_CmsFormField.LayoutData getLayoutData()
I_CmsStringModel getModel()
java.lang.String getModelId()
java.lang.String getModelValue()
I_CmsFormField.ValidationStatus getValidationStatus()
If the field has no validator, this should always return valid
.
I_CmsValidator getValidator()
I_CmsFormWidget getWidget()
void setId(java.lang.String id)
id
- the new idvoid setValidationStatus(I_CmsFormField.ValidationStatus status)
This will only have an effect if the field has a validator.
status
- the new validation statusvoid setValidator(I_CmsValidator validator)
validator
- the new validatorvoid unbind()