Hi! I use the following code in my JSP/JSF page to render a list of radiobuttons:
<t:selectOneRadio lang="de" layout="pageDirection" required="true" styleClass="daten" title="Radiobuttons zur Auswahl des Umfragetyps"> <f:selectItems value="#{UmfrageBacking.umfragetypen}" /> </t:selectOneRadio> The following code ist generated with h:selectOneRadio and t:selectOneRadio using MyFaces 1.1.1: <table class="daten"> <tr> <td><label><input type="radio" name="_id0:_id2" value="Lehrevaluierung" lang="de" title="Radiobuttons zur Auswahl des Umfragetyps" class="daten" /> Lehrevaluierung</label></td></tr></tr> <tr><td><label><input type="radio" name="_id0:_id2" value="Allgemeine Studierendenbefragung" lang="de" title="Radiobuttons zur Auswahl des Umfragetyps" class="daten" /> Allgemeine Studierendenbefragung</label></td> </tr></tr> <tr> <td><label><input type="radio" name="_id0:_id2" value="Mitarbeiterbefragung" lang="de" title="Radiobuttons zur Auswahl des Umfragetyps" class="daten" /> Mitarbeiterbefragung</label></td> </tr></tr> <tr> <td><label><input type="radio" name="_id0:_id2" value="Sonstige Umfrage" lang="de" title="Radiobuttons zur Auswahl des Umfragetyps" class="daten" /> Sonstige Umfrage</label></td> </tr></tr> </table> As you can see, besides of the useless label element, there's also a double </tr> end tag for the delimitation of each table row. -------- Regards, Matthias > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Auftrag > von Bruno Aranda > Gesendet: Donnerstag, 3. November 2005 18:19 > An: MyFaces Discussion > Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels > > > You are true, that's not desirable behaviour... can we see the snippet > of the jsf code you are using? > > Regards, > > Bruno > > 2005/11/3, Matthias Kahlau <[EMAIL PROTECTED]>: > > Hi all! > > > > > > Doesn't the rendering of radiobuttons / labels work correctly? > > > > Usually, you have to use the label element using the following approach > > described in the SelfHTML 8.1 documentation: > > > > <label for="idName">Label:</label> > > <[Formelement] id="idName"> > > > > But JSF renders something like this (it doesn't matter if I use > the standard > > JSF HTML RenderKit taglib or Tomahawk): > > <label><input type="radio" name="_id0:_id2" value="someValue" lang="de" > > title="someTitle" class="daten" /> someDescription</label> > > > > With this approach, you can't click on the label to select/deselect the > > radiobutton, so the label just makes no sense. > > Using the label to select/deselect the radiobutton would improve the > > usability of the control. > > > > Is this a bug? > > > > > > > > Regards, > > Matthias > > > > > > > > > >