public class CmsBasicFormField extends java.lang.Object implements I_CmsFormField
I_CmsFormField.LayoutData, I_CmsFormField.ValidationStatus
构造器和说明 |
---|
CmsBasicFormField(java.lang.String id,
java.lang.String description,
java.lang.String label,
java.lang.Object defaultValue,
I_CmsFormWidget widget)
Constructs a new form field.
|
限定符和类型 | 方法和说明 |
---|---|
void |
bind(I_CmsStringModel model)
Binds a model object to the form field.
|
static CmsBasicFormField |
createField(CmsXmlContentProperty propertyConfig)
Utility method for creating a single basic form field from an id and a property configuration.
|
static CmsBasicFormField |
createField(CmsXmlContentProperty propertyConfig,
java.util.Map<java.lang.String,java.lang.String> additionalParams)
Utility method for creating a basic form field.
|
static CmsBasicFormField |
createField(CmsXmlContentProperty propertyConfig,
java.lang.String fieldId,
I_CmsFormWidgetMultiFactory factory,
java.util.Map<java.lang.String,java.lang.String> additionalParams,
boolean alwaysAllowEmpty)
Utility method for creating a single basic form field from an id and a property configuration.
|
static java.util.Map<java.lang.String,I_CmsFormField> |
createFields(java.util.Collection<CmsXmlContentProperty> propertyConfigurations)
Creates a map of fields from a map of field configurations.
|
boolean |
equals(java.lang.Object o) |
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.
|
int |
hashCode() |
void |
setId(java.lang.String id)
Sets the id of this form field.
|
void |
setValidationStatus(I_CmsFormField.ValidationStatus validationStatus)
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.
|
public CmsBasicFormField(java.lang.String id, java.lang.String description, java.lang.String label, java.lang.Object defaultValue, I_CmsFormWidget widget)
id
- the id of the form fielddescription
- the description of the form fieldlabel
- the label of the form fielddefaultValue
- the default value of the form fieldwidget
- the widget of the form fieldpublic static CmsBasicFormField createField(CmsXmlContentProperty propertyConfig)
propertyConfig
- the configuration of the propertypublic static CmsBasicFormField createField(CmsXmlContentProperty propertyConfig, java.util.Map<java.lang.String,java.lang.String> additionalParams)
propertyConfig
- the property configurationadditionalParams
- the additional parameterspublic static CmsBasicFormField createField(CmsXmlContentProperty propertyConfig, java.lang.String fieldId, I_CmsFormWidgetMultiFactory factory, java.util.Map<java.lang.String,java.lang.String> additionalParams, boolean alwaysAllowEmpty)
propertyConfig
- the configuration of the propertyfieldId
- the field idfactory
- a factory for creating form widgetsadditionalParams
- alwaysAllowEmpty
- public static java.util.Map<java.lang.String,I_CmsFormField> createFields(java.util.Collection<CmsXmlContentProperty> propertyConfigurations)
propertyConfigurations
- the map of field configurationspublic void bind(I_CmsStringModel model)
I_CmsFormField
bind
在接口中 I_CmsFormField
model
- the model objectI_CmsFormField.bind(org.opencms.gwt.client.ui.input.I_CmsStringModel)
public boolean equals(java.lang.Object o)
equals
在类中 java.lang.Object
Object.equals(java.lang.Object)
public java.lang.Object getDefaultValue()
I_CmsFormField
getDefaultValue
在接口中 I_CmsFormField
I_CmsFormField.getDefaultValue()
public java.lang.String getDescription()
I_CmsFormField
getDescription
在接口中 I_CmsFormField
I_CmsFormField.getDescription()
public java.lang.String getId()
I_CmsFormField
getId
在接口中 I_CmsFormField
I_CmsFormField.getId()
public java.lang.String getLabel()
I_CmsFormField
getLabel
在接口中 I_CmsFormField
I_CmsFormField.getLabel()
public I_CmsFormField.LayoutData getLayoutData()
I_CmsFormField
getLayoutData
在接口中 I_CmsFormField
I_CmsFormField.getLayoutData()
public I_CmsStringModel getModel()
I_CmsFormField
getModel
在接口中 I_CmsFormField
I_CmsFormField.getModel()
public java.lang.String getModelId()
I_CmsFormField
getModelId
在接口中 I_CmsFormField
I_CmsFormField.getModelId()
public java.lang.String getModelValue()
I_CmsFormField
getModelValue
在接口中 I_CmsFormField
I_CmsFormField.getModelValue()
public I_CmsFormField.ValidationStatus getValidationStatus()
I_CmsFormField
If the field has no validator, this should always return valid
.
getValidationStatus
在接口中 I_CmsFormField
I_CmsFormField.getValidationStatus()
public I_CmsValidator getValidator()
I_CmsFormField
getValidator
在接口中 I_CmsFormField
I_CmsFormField.getValidator()
public I_CmsFormWidget getWidget()
I_CmsFormField
getWidget
在接口中 I_CmsFormField
I_CmsFormField.getWidget()
public int hashCode()
hashCode
在类中 java.lang.Object
Object.hashCode()
public void setId(java.lang.String id)
I_CmsFormField
setId
在接口中 I_CmsFormField
id
- the new idI_CmsFormField.setId(java.lang.String)
public void setValidationStatus(I_CmsFormField.ValidationStatus validationStatus)
I_CmsFormField
This will only have an effect if the field has a validator.
setValidationStatus
在接口中 I_CmsFormField
validationStatus
- the new validation statusI_CmsFormField.setValidationStatus(org.opencms.gwt.client.ui.input.I_CmsFormField.ValidationStatus)
public void setValidator(I_CmsValidator validator)
I_CmsFormField
setValidator
在接口中 I_CmsFormField
validator
- the new validatorI_CmsFormField.setValidator(org.opencms.gwt.client.validation.I_CmsValidator)
public void unbind()
I_CmsFormField
unbind
在接口中 I_CmsFormField
I_CmsFormField.unbind()