Hi guys, i would like to know how to make to switch a togglepanel where the togglecontrol are inside a h:selectOneMenu. Until now, cant make it works. I wrote this piece os code for u.
<h:selectOneRadio value="2" > <f:selectItem itemLabel="Persona juridica" itemValue="1" /> <f:selectItem itemLabel="Persona natural" itemValue="2" /> <f:selectItem itemLabel="No domiciliado" itemValue="3" /> </h:selectOneRadio> <rich:togglePanel style="height:53px; width 600px" id="tpersona" switchType="client" initialState="juridica" stateOrder="juridica, natural, nodomiciliada"> <f:facet name="juridica"> <f:subview id="p1"> <table> <tr> <td>Persona de contacto:</td> <td colspan="3"><h:inputText styleClass="textbox" size="20" maxlength="80"/></td> </tr> </table> </f:subview> </f:facet> <f:facet name="natural"> <f:subview id="p2"> <table> <tr> <td width="130" >RUC:</td> <td><h:inputText styleClass="textbox" size="20" maxlength="8"/></td> <td width="130" >Nombre:</td> <td><h:inputText styleClass="textbox" size="20" maxlength="30"/></td> </tr> </table> </f:subview> </f:facet> <f:facet name="nodomiciliada"> <f:subview id="p3"> <table> <tr> <td width="130">Razon Social:</td> <td colspan="3"><h:inputText styleClass="textbox" size="20" maxlength="80"/></td> </tr> </table> </f:subview> </f:facet> </rich:togglePanel>
<rich:toggleControl id="opc1" for="tpersona" switchToState="juridica"><img src="imagenes/pro1n.png" border="0" /> </rich:toggleControl> <rich:toggleControl id="opc2" for="tpersona" switchToState="natural"><img src="imagenes/pro2n.png" border="0" /> </rich:toggleControl> <rich:toggleControl id="opc3" for="tpersona" switchToState="nodomiciliada"><img src="imagenes/pro3n.png" border="0" /> </rich:toggleControl>