JSF: attach rich:toggleControl to radio buttons or select items.

Posted by arw on Stack Overflow See other posts from Stack Overflow or by arw
Published on 2009-08-11T18:29:58Z Indexed on 2010/06/01 12:03 UTC
Read the original article Hit count: 251

Filed under:
|
|

Has anyone had any success attaching a rich:toggleControl component to a radio button component (h:selectOneRadio) or alternatively any of its children select items (in this case s:enumItem).

Basic code example:

<h:selectOneRadio value="#{backingValue}">
   <s:enumItem enumValue="VAL_1" itemLabel="Value One" />
   <s:enumItem enumValue="VAL_2" itemLabel="Value Two" />
   <s:convertEnum />
</h:selectOneRadio>

The ideal thing would be to attach the toggle control to the enumItems so I could have it switch to a particular state. However at this point I'd be happy if the toggle control can just be attached to the selectOneRadio. I've tried the toggle control as a child of the selectOneRadio and enumItems; neither works. I've also tried wrapping the toggleControl around the selectOneRadio, the toggle control works in this case but the radio buttons don't :(

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf