org.apache.tapestry5
Interface ValidationDecorator

All Known Implementing Classes:
AutofocusValidationDecorator, BaseValidationDecorator, DefaultValidationDecorator, ValidationDecoratorWrapper

public interface ValidationDecorator

An object responsible for performing decorations around fields and field labels. The decorator is notified at intervals by the fields and labels.

In most western languages (written left to right) the label will render before the field, so the properties of the Field may not be set yet (or may reflect a previous looping's rendering). It may be necessary to Heartbeat.defer(Runnable) defer any rendering} until after the Label and the Field have both had their change to initialize and render.


Method Summary
 void afterField(Field field)
          Invoked after the field has completed rendering itself.
 void afterLabel(Field field)
          Invoked by Label after rendering itself.
 void beforeField(Field field)
          Renders immediately before the field itself.
 void beforeLabel(Field field)
          Invoked by a Label before rendering itself.
 void insideField(Field field)
          Invoked at a point where the decorator may write additional attributes into the field.
 void insideLabel(Field field, Element labelElement)
          Invoked after the label has rendered its tag, but before it has rendered content inside the tag, to allow the decorator to write additional attributes.
 

Method Detail

beforeLabel

void beforeLabel(Field field)
Invoked by a Label before rendering itself.

Parameters:
field - for this label

insideLabel

void insideLabel(Field field,
                 Element labelElement)
Invoked after the label has rendered its tag, but before it has rendered content inside the tag, to allow the decorator to write additional attributes.

Parameters:
field - the field corresponding to the label
labelElement - the element for this label

afterLabel

void afterLabel(Field field)
Invoked by Label after rendering itself.

Parameters:
field -

beforeField

void beforeField(Field field)
Renders immediately before the field itself. The field will typically render a single element, though a complex field may render multiple elements or even some JavaScript.

Parameters:
field -

insideField

void insideField(Field field)
Invoked at a point where the decorator may write additional attributes into the field. Generally speaking, you will want to render informal parameters before invoking this method.

Parameters:
field -

afterField

void afterField(Field field)
Invoked after the field has completed rendering itself.



Copyright © 2003-2012 The Apache Software Foundation.