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_CmsFormFieldbind 在接口中 I_CmsFormFieldmodel - the model objectI_CmsFormField.bind(org.opencms.gwt.client.ui.input.I_CmsStringModel)public boolean equals(java.lang.Object o)
equals 在类中 java.lang.ObjectObject.equals(java.lang.Object)public java.lang.Object getDefaultValue()
I_CmsFormFieldgetDefaultValue 在接口中 I_CmsFormFieldI_CmsFormField.getDefaultValue()public java.lang.String getDescription()
I_CmsFormFieldgetDescription 在接口中 I_CmsFormFieldI_CmsFormField.getDescription()public java.lang.String getId()
I_CmsFormFieldgetId 在接口中 I_CmsFormFieldI_CmsFormField.getId()public java.lang.String getLabel()
I_CmsFormFieldgetLabel 在接口中 I_CmsFormFieldI_CmsFormField.getLabel()public I_CmsFormField.LayoutData getLayoutData()
I_CmsFormFieldgetLayoutData 在接口中 I_CmsFormFieldI_CmsFormField.getLayoutData()public I_CmsStringModel getModel()
I_CmsFormFieldgetModel 在接口中 I_CmsFormFieldI_CmsFormField.getModel()public java.lang.String getModelId()
I_CmsFormFieldgetModelId 在接口中 I_CmsFormFieldI_CmsFormField.getModelId()public java.lang.String getModelValue()
I_CmsFormFieldgetModelValue 在接口中 I_CmsFormFieldI_CmsFormField.getModelValue()public I_CmsFormField.ValidationStatus getValidationStatus()
I_CmsFormField
If the field has no validator, this should always return valid.
getValidationStatus 在接口中 I_CmsFormFieldI_CmsFormField.getValidationStatus()public I_CmsValidator getValidator()
I_CmsFormFieldgetValidator 在接口中 I_CmsFormFieldI_CmsFormField.getValidator()public I_CmsFormWidget getWidget()
I_CmsFormFieldgetWidget 在接口中 I_CmsFormFieldI_CmsFormField.getWidget()public int hashCode()
hashCode 在类中 java.lang.ObjectObject.hashCode()public void setId(java.lang.String id)
I_CmsFormFieldsetId 在接口中 I_CmsFormFieldid - the new idI_CmsFormField.setId(java.lang.String)public void setValidationStatus(I_CmsFormField.ValidationStatus validationStatus)
I_CmsFormFieldThis will only have an effect if the field has a validator.
setValidationStatus 在接口中 I_CmsFormFieldvalidationStatus - the new validation statusI_CmsFormField.setValidationStatus(org.opencms.gwt.client.ui.input.I_CmsFormField.ValidationStatus)public void setValidator(I_CmsValidator validator)
I_CmsFormFieldsetValidator 在接口中 I_CmsFormFieldvalidator - the new validatorI_CmsFormField.setValidator(org.opencms.gwt.client.validation.I_CmsValidator)public void unbind()
I_CmsFormFieldunbind 在接口中 I_CmsFormFieldI_CmsFormField.unbind()