myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: selectItems with clickable labels
Date Wed, 27 Jun 2007 19:10:12 GMT
You can do it with css and javascript. I don't have access to my code
that has it at the moment, but with css you can hide the radio button
part of the control. You need to use IE6 to support clicking a radio
label though, as IE6 doesn't support that unlike the other browsers.
Just code it so that you have a link in each select item, that when
clicked gets the parent INPUT tag and sets the checked property to
try. You can do this by extending the radio button renderer.

On 6/26/07, Axel Karst <A.Karst@chili-radiology.com> wrote:
> Hi all,
>
> is it possible to have labels of selectItems to be clickable and change
> the state of the corresponding radio buttons?  I use Seam for the
> selectItems.
>
> My code:
>
> <h:selectOneRadio value="#{internalTpDlg.currentTestpattern}">
>         <s:selectItems var="currentTestpattern"
>                 label="#{currentTestpattern}"
>                 value="#{internalTpDlg.testpatternItems}">
>         </s:selectItems>
>         <f:selectItem />
>         <s:convertEnum />
>
>         <a4j:support event="onchange" reRender="Selector">
>         </a4j:support>
> </h:selectOneRadio>
>
>
> Thanks in advance,
> Axel
>

Mime
View raw message