struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Gordon <adam.gor...@readytalk.com>
Subject Struts HTML tag library clarification
Date Fri, 07 Jul 2006 19:09:14 GMT
According to the radio button section of the wiki page 
(http://wiki.apache.org/struts/StrutsWidgets), this is by design but I 
find it a little annoying...

It appears that with the <html:xhtml/> tag at the top of a JSP, an HTML 
input element gets closed correctly per bug 5518 (back in 2002).  What I 
don't see is this behavior:

If I have:

    <input type="radio">Some text</input>

My browser (Firefox) treats the "Some text" text as part of the radio 
button so if I use the onclick attribute, I can click the text and it's 
the same as clicking the radio button (I do not, however, know if some 
browsers treat this differently).

However, if I have:

    <html:radio property="foo">Some text</html:radio>

It gets rendered as:

    <input type="radio" ... />Some text

And the "Some text" is just that, plain text.  The only way I can see to 
make it clickable is to use an anchor tag.

So, I guess my question is was this behavior by design and if so why?

Thanks

-Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message