It would be good to provide some sort of automated support for this
component, but I don't see how we can possibly assume where the label
component will be placed.  Yes, it could be used for prototypes, but I'd
rather not build a framework that people use to build throwaway code.

The annoying part of this would be forcing them to build the same
resulting "name" attribute as the associated component.  This gets
annoying with indexed tags, and even worse, manually indexed or mapped
properties.  I wonder whether it's feasible to have the Struts tags
point in the OTHER direction, from the pointed-to component to the label
component, so the resulting "name" attribute can be reliably rendered in
the associated "label" component.  I don't think we've done anything
like this before, however.  The text of the label could be specified
"raw" or as a "key" attribute, either in the pointed-to component, or in
the "label" component.

> -----Original Message-----
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 10:11 AM
> To: [EMAIL PROTECTED]
> Subject: Enhancement Request - add label and labelKey to form elements
> 
> 
> I thought I'd run this idea by the development team before entering it
> into Bugzilla.
> 
> One of the items that is required with 508 compliance is a 
> <label> value
> 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" label="Name:"/> OR
> <html:text name="name" styleId="name" size="50" 
> labelKey="prompt.name"/>
> 
> The problems I see with this are that you lose some control over the
> presentation (i.e. a <br /> after the label or labels in a separate
> <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?
> 
> What does everyone think?  Would anyone use it?
> 
> Thanks,
> 
> Matt
> 
> 
> 
> --
> 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]>

Reply via email to