3 Replies Latest reply on Aug 6, 2008 9:10 AM by Ilya Shaikovsky

    selectitem +togglepanel

    Miguel Miguel Newbie

      Hi there :D, i really need help on this, guys. I want to use selectItems as a togglecontrol. Well, i have this part of code that show the actual situation. It works, im using 3 images as togglecontrol. Im asking for hep to use the selectItems as a toggleControl or include a togglecontrol.

      <table width="100%">
       <tr>
       <td align="center">
       <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>
       </td>
       </tr>
       <tr>
       <td align="center">
       <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>
       </td>
       </tr>
      </table>
      
      
      <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 width="130">RUC:</td>
       <td><h:inputText styleClass="textbox" size="20" maxlength="11"/></td>
       <td width="130">Razon Social:</td>
       <td><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>
      


      I hope u guys could understand my problem y help mi on this. Bye