myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Aranda <brunoara...@gmail.com>
Subject Re: MyFaces 1.1.1 - rendering of radiobuttons/labels
Date Fri, 04 Nov 2005 10:27:15 GMT
No no, you don't have to use the labels directly, the renderer encodes
them following the spec on how this component should be rendered...

Regards,

Bruno

2005/11/4, Matthias Kahlau <mkahlau@web.de>:
> Ok, but how do I have to use the <h:outputLabel> tag, when I use
> <f:selectItems ..> to render
> a dynamic list of options?
>
> Viele Grüße
> Matthias Kahlau
>
> > -----Ursprüngliche Nachricht-----
> > Von: users-return-11624-mkahlau=web.de@myfaces.apache.org
> > [mailto:users-return-11624-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> > von Mathias Brökelmann
> > Gesendet: Freitag, 4. November 2005 10:43
> > An: MyFaces Discussion
> > Betreff: Re: MyFaces 1.1.1 - rendering of radiobuttons/labels
> >
> >
> > I miss the <h:outputLabel> in your jsp code
> >
> > 2005/11/4, Matthias Kahlau <mkahlau@web.de>:
> > > 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"
> > > />&#160;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" />&#160;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"
> > > />&#160;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"
> > > />&#160;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: users-return-11574-mkahlau=web.de@myfaces.apache.org
> > > >
> [mailto:users-return-11574-mkahlau=web.de@myfaces.apache.org]Im 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 <mkahlau@web.de>:
> > > > 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" />&#160;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
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
>
>
> --
> Mathias
>
>

Mime
View raw message