myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Heinen" <>
Subject RE: [tomahawk] single checkboxes are rendered inside label tags
Date Tue, 04 Nov 2008 12:40:19 GMT
-----Original Message-----
From: Simon Kitching [] 
Sent: Dienstag, 4. November 2008 13:06
To: MyFaces Discussion
Subject: Re: [tomahawk] single checkboxes are rendered inside label tags

Michael Heinen schrieb:
> I recently updated tomhawk 1.1.5 to 1.1.7 and noticed that single
> checkboxes are rendered inside an additional label tag.
> The html output is now:
>   <INPUT id="..." type="checkbox" />foo
> </LABEL>
> Why is this additional label tag rendered in 1.1.7?
> Is there any benefit?
I believe this is equivalent to:
  <label for="id1">foo</label>
  <input id="id1" type="checkbox">
but cleaner (a parent/child relation seems more appropriate here than
the "for" approach).

If I remember correctly, having the text for the checkbout output as a
label (in either form) means that clicking on the label changes the
checkbox state too. Writing the checkbox text ("foo" in this case) as
just plain text does not have that effect.

I don't know of any other reason. Is there a problem?

Regards, Simon

-- Emails in "mixed" posting style will be ignored
-- (

No there is no problem.
Just a few javascript methods for DOM manipulation failed due to the new
I just was curious about it because there wasn't any label tag rendered
in 1.1.5


View raw message