public interface FieldHandler
Definition of an interface for accessing fields of a form.
A form consists of an arbitrary number of fields, i.e. interaction elements where the user can enter data. Such a field must be able to interact with the GUI widget used for data entering. In addition it supports validation of the entered data and conversion into a target data type.
Modifier and Type | Method and Description |
---|---|
ComponentHandler<?> |
getComponentHandler()
Returns the
ComponentHandler used by this
FieldHandler . |
Object |
getData()
Returns the data of this field.
|
String |
getDisplayName()
Returns the display name of this field.
|
String |
getPropertyName()
Returns the name of the corresponding property in the form bean.
|
Class<?> |
getType()
Returns the data type for this field.
|
void |
setData(Object data)
Sets the data of this field.
|
ValidationResult |
validate(ValidationPhase phase)
Validates this field either at the field or the form level.
|
ComponentHandler<?> getComponentHandler()
ComponentHandler
used by this
FieldHandler
. With this handler, the underlying GUI
component can be controlled.ComponentHandler
Object getData()
ComponentHandler
. Instead it
can be the result of a conversion process to transform the data into a
certain target data type. For this conversion to succeed it must be
ensured that this method is only envoked after validation at the field
level has been successfull. The object returned here should be of the
same type as returned by getType()
.void setData(Object data)
getData()
.data
- the data to setValidationResult validate(ValidationPhase phase)
ValidationResult
object contains information if the
field's content is valid or which errors have been found.phase
- determines the validation phaseClass<?> getType()
String getPropertyName()
String getDisplayName()
Copyright © 2016 The JGUIraffe Team. All rights reserved.