|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.web.validation.FormField
public class FormField
Class describing a single form field.
| Constructor Summary | |
|---|---|
FormField(java.lang.String name,
java.lang.String display,
java.lang.String type,
java.lang.String req,
java.lang.String format,
java.lang.String defVal)
Create a new FormField instance. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getDefault()
Returns the default value for this field. |
java.lang.String |
getDisplay()
Returns the display name of this field. |
boolean |
isRequired()
Indicates whether or not this field is required. |
java.lang.Object |
validate(java.lang.String value)
Validate the given String value and return an instance of the configured target type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormField(java.lang.String name,
java.lang.String display,
java.lang.String type,
java.lang.String req,
java.lang.String format,
java.lang.String defVal)
throws ValidationException
In addition to setting up the simple members, a Constructor instance for the configured Java type of this field is also created. The constructor will be used to construct instances of the configured type.
name - Name of this field.display - Display name for this field.type - Java type of this field.req - String containing "true" or "false" to inidicate whether
this field is required or not.format - If this field is of type "java.util.Date" use this format
to parse Date instances.defVal - Default value for this field.
ValidationException - if this field cannot be created.| Method Detail |
|---|
public java.lang.Object validate(java.lang.String value)
throws ValidationException
value - String value to validate.
ValidationException - if the value could not be validated.public java.lang.Object getDefault()
public java.lang.String getDisplay()
public boolean isRequired()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||