Need to be able to render elements before and after form labels

Details

Description

The ValidationDecorator interface allows you to render additional attributes on the label, elements before and after the field, and attributes on the field. Need to add beforeLabel() and afterLabel() methods.

Activity

This is not a big deal, with the provision that in western languages with left-to-right rendering, the label will usually precede the Field, which means that the error state of the field will not be known at the time the label renders.

You can see built in logic to defer part of the rendering of the Label until the end of the Heartbeat, to a) link the Label to the Field (the Field will have a valid clientId after it renders) and b) to change the CSS class of the Label if the field is in error.

To mark a field required may require similar logic, though required is more likely to be valid before the Field renders than its error state.

Howard M. Lewis Ship
added a comment - 16/Nov/07 19:35 This is not a big deal, with the provision that in western languages with left-to-right rendering, the label will usually precede the Field, which means that the error state of the field will not be known at the time the label renders.
You can see built in logic to defer part of the rendering of the Label until the end of the Heartbeat, to a) link the Label to the Field (the Field will have a valid clientId after it renders) and b) to change the CSS class of the Label if the field is in error.
To mark a field required may require similar logic, though required is more likely to be valid before the Field renders than its error state.