This will be part of the app I post up this week too.
Erik
Matt Raible wrote:
I agree, and does require more work, considering:
<html:label for="name">
<bean:message key="prompt.username"/>
</html:label>
Is more typing than:
<label for="name">
...
</label>
Maybe something like this would make it more useful:
<html:label key="prompt.username" />
I was thinking of reducing the prefixes in my struts-xdoclet app from:
html -> h
logic -> l
bean -> b
tiles -> t
nested -> n
Would this create too much confusion (even though it would require less
typing?)?
It much rather type <h:label key="prompt.username" />
Matt
-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: Enhancement Request - add label and labelKey to form elements
I don't see what advantage the <html:label> tag has over hand coding the html. Looks like the same amount of work to me.
David
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>before entering
Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
To: Struts Developers List <[EMAIL PROTECTED]>
Subject: Re: Enhancement Request - add label and labelKey to form elements
Date: Mon, 25 Nov 2002 11:14:10 -0800 (PST)
On Mon, 25 Nov 2002, Matt Raible wrote:
Date: Mon, 25 Nov 2002 11:10:33 -0700
From: Matt Raible <[EMAIL PROTECTED]>
Reply-To: Struts Developers List <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Enhancement Request - add label and labelKey to form elements
I thought I'd run this idea by the development team
a <label>it into Bugzilla.
One of the items that is required with 508 compliance is
label="Name:"/> ORvalue for each form element:
For example:
<label for="name">Name:</label>
<input type="text" id="name" size="50" name="name" />
More information at: http://www.csuohio.edu/uctl/508/forms.html
This would typically be rendered with Struts tags using:
<label for="name">Name:</label>
<html:text name="name" styleId="name" size="50"/>
To make it easier, we could do:
<html:text name="name" styleId="name" size="50"
control over the<html:text name="name" styleId="name" size="50" labelKey="prompt.name"/>
The problems I see with this are that you lose some
a separatepresentation (i.e. a <br /> after the label or labels in
useful. I just<td>). However, it might be useful for rapid prototyping and code-generating tools. My hope someday is that the JSP simply renders XML, and then an XSL stylesheet is applied, and in this case, the presentation issues would disappear?I think a way to create <label> elements would be very
What does everyone think? Would anyone use it?
don't think we should embed it in the existing UI elementtags (for the
reasons that others have articulated.generate
How about a new <html:label> tag instead. Then, you could do things like this on the logon page in struts-example:
...
<tr>
<th align="right">
<html:label for="name">
<bean:message key="prompt.username"/>
</html:label>
</th>
<td align="left">
<html:text styleId="name" property="username" size="16"
maxlength="18"/>
</td>
</tr>
...
(I thought you tied labels to elements with the "id" ???)
The above approach assumes that it's not necessary to localize the element id itself (which would really complicate attempts to
JavaScript event handlers), but you do (of course) need tolocalize the
text of the label.you manage
This also imposes no restrictions on the mechanisms by which
layout, and can be easily retrofitted onto existing pages.CraigThanks, Matt
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
--
To unsubscribe, e-mail: <mailto:struts-dev-> [EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>