I am about to commit a new label tag, but wanted opinions first.

The label tag represents an HTML label, and the tag's primary usage is to allow a different style when the specified form element has an error. In the following example, this label will have an error style when the "firstName" form property is erring.

<html:label property="firstName" errorStyleClass="myClass">...</html:label>

Labels can transfer the focus when clicked. The HTML4 spec has a "for" property which specifies the ID of the focusable element, but I have called it "forStyleId" to stay in line with the "errorStyleId" and "styleId" properties already in existence. Thoughts on the property name?

The "forStyleId" property is optional; if it is not specified, it defaults to the value specified in "property". Thus this allows a quick shorthand to add the ids only to the form elements. Thoughts on the shorthand? I prefer it.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to