myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick McCabe" <>
Subject SelectItem and labels
Date Tue, 10 Jul 2007 19:23:20 GMT
 Hi All

I have a requirement that the radio buttons in our application are able to
be toggled by their label. I believe the standard HTML for this according to
W3Schools is as follows:

<input type="radio" id="blah" name="blah2"/>
<label for="blah">CLICK ME</label>

link for reference

That is all great and stuff, however JSF renders the labels a little
differently, like so:

<label><input type="radio" id="blah" name="blah2"/>CLICK ME</label>

Well, that's not so bad, except for one thing.


So, since the default JSF rendering doesn't work, I thought about trying to
implement the first one manually by using some f:verbatim tags to put the
extra tag in there. Only problem is that there is no ID on the f:selectItem,
so there is no way to attach a label to it for IE

Second, I had thought about using the tomahawk component library, because
they have this neet little feature called forceId, which allows me to put an
id on a component. 2 problems here, first, tomahawk doesn't have a
selectItem component, only selectItems. Secondly, selectItems doesn't accept
the forceId attribute, which makes sence because it is used to display a
list of items.

my LAST resort, would be to create a custom component that can plug in with
tomahawk to be able to use the forceId attribute, and then put the label tag
in manually.

Can anybody offer any help or insight with this? 99% of our users are using
IE, and this is a requirement.



View raw message