|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A FormElement represents a single form field. Each FormElement can have a FormValidator as well as zero or more user-readable messages and zero or more user-readable error messages. The FormElement interface provides a common interface which all FormElements must implement.
Method Summary | |
java.lang.String |
getDefaultValue()
Get the default value which is used if no data is submitted for the given form element. |
java.lang.String |
getMessage()
Get the field's message in the default Locale. |
java.lang.String |
getMessage(java.util.Locale locale)
Get the message in the given Locale. |
java.lang.String |
getName()
Get the FormElement name. |
Storer |
getStorer()
Get the Storer used to store field data in the target object. |
TypeConverter |
getTypeConverter()
Get the TypeConverter which will be applied before invoking the target object's write method. |
Validator |
getValidator()
Get the validator for this field. |
java.lang.String |
getWriteMethod()
Get a predefined write method for the given form element. |
boolean |
isOptional()
Return true if the FormElement is optional. |
void |
setDefaultValue(java.lang.String defaultValue)
Set the default value which is used if no data is submitted for the given form element. |
void |
setOptional(boolean optional)
Set to true if the FormElement is optional. |
void |
setOptional(java.lang.String optional)
Set to "true" if the FormElement is optional. |
Method Detail |
public java.lang.String getName()
public java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- The new default valuepublic boolean isOptional()
public void setOptional(boolean optional)
optional
- True if the element is optionalpublic void setOptional(java.lang.String optional)
optional
- String "true" if element is optionalpublic java.lang.String getMessage()
public java.lang.String getMessage(java.util.Locale locale)
locale
- The Locale
public java.lang.String getWriteMethod()
public Validator getValidator()
public TypeConverter getTypeConverter()
public Storer getStorer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |