|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.formproc.form.AbstractFormElement
An abstract base class which implements the FormElement interface.
| Field Summary | |
protected java.lang.String |
defaultValue
|
protected FormElementGroup |
formElementGroup
|
protected MessageProvider |
messageProvider
|
protected java.util.HashMap |
messages
|
protected java.lang.String |
name
|
protected boolean |
optional
|
protected Storer |
storer
|
protected TypeConverter |
typeConverter
|
protected Validator |
validator
|
protected java.lang.String |
writeMethod
|
| Constructor Summary | |
AbstractFormElement()
Default constructor. |
|
AbstractFormElement(FormElementGroup formElementGroup)
Construct a new AbstractFormElement which is member of the given FormElementGroup. |
|
| 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 |
setName(java.lang.String name)
Set the FormElement name. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected FormElementGroup formElementGroup
protected java.util.HashMap messages
protected java.lang.String writeMethod
protected java.lang.String name
protected java.lang.String defaultValue
protected boolean optional
protected Validator validator
protected TypeConverter typeConverter
protected Storer storer
protected MessageProvider messageProvider
| Constructor Detail |
public AbstractFormElement()
public AbstractFormElement(FormElementGroup formElementGroup)
formElementGroup - The formElementGroup| Method Detail |
public java.lang.String getName()
getName in interface FormElementpublic void setName(java.lang.String name)
name - The namepublic java.lang.String getDefaultValue()
getDefaultValue in interface FormElementpublic void setDefaultValue(java.lang.String defaultValue)
setDefaultValue in interface FormElementdefaultValue - The new default valuepublic boolean isOptional()
isOptional in interface FormElementpublic void setOptional(boolean optional)
setOptional in interface FormElementoptional - True if the element is optionalpublic void setOptional(java.lang.String optional)
setOptional in interface FormElementoptional - String "true" if element is optionalpublic java.lang.String getMessage()
getMessage in interface FormElementpublic java.lang.String getMessage(java.util.Locale locale)
getMessage in interface FormElementlocale - The Locale
public java.lang.String getWriteMethod()
getWriteMethod in interface FormElementpublic Validator getValidator()
getValidator in interface FormElementpublic TypeConverter getTypeConverter()
getTypeConverter in interface FormElementpublic Storer getStorer()
getStorer in interface FormElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||