-----Original Message-----
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
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:
>
> <LABEL>
>
>   <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
-- (http://en.wikipedia.org/wiki/Posting_style)


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

Thanks,
Michael

Reply via email to