On 11/18/06, Paul Benedict <[EMAIL PROTECTED]> wrote:

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.


I guess I'm not quite getting how the various attributes would work. It
seems to me that you really only need 'for', 'styleId' and 'errorStyleId',
where 'for' generates, um, the 'for' attribute, and the other two generate
the styles for normal and error states.

What am I missing in what you're intending? I don't get the 'forStyleId'
attribute and why you need a 'property' attribute.

--
Martin Cooper


Paul

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


Reply via email to