|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FieldMarker
Definition of an interface for objects that are able to mark form input fields based on their validation status.
An object implementing this interface is associated with a
. The FormControllerFormController
keeps track of the validation status of the fields contained in the current
form. Whenever the validation status of an input field changes (e.g. the user
visits the field for the first time and types in some valid or invalid data),
the FieldMarker is notified about this change. It can then
manipulate the appearance of the affected field to reflect the new status.
This way it is possible to display invalid fields in a special way so that
the user can see on a single glance, which fields have to be edited.
When the form is opened an initial validation is performed resulting in the
initial validation status. Further validations are triggered by another
helper object, a FormValidationTrigger. The
FieldMarker is invoked after each validation for each field
whose status has changed in the meantime.
When the FieldMarker is invoked, it is passed the name of the
affected component, its current validation status, its last status, and its
. This should be enough information for
changing the fields's appearance accordingly. If more data is required (e.g.
a reference to the controller or the WidgetHandlerComponentData object),
functionality of the dependency injection framework can be used
for obtaining references to the required beans.
| Method Summary | |
|---|---|
void |
markField(java.lang.String name,
WidgetHandler widget,
FieldValidationStatus status,
FieldValidationStatus lastStatus)
Marks the specified field depending on its validation status. |
| Method Detail |
|---|
void markField(java.lang.String name,
WidgetHandler widget,
FieldValidationStatus status,
FieldValidationStatus lastStatus)
name - the name of the fieldwidget - the WidgetHandler for this fieldstatus - the current validation statuslastStatus - the last known validation status of this field (this
can be null if no last status is known, e.g. if an initial
validation was performed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||