1 Reply Latest reply on Aug 3, 2007 1:21 PM by Igor Shabalov

    Trying to use an action in the togglePanel

    Norbert Kunstek Newbie

      Hello,

      I'm trying to use an action in the togglePanel component like this:

      <h:form id="checkout_paymentAddress">
       <rich:togglePanel id="paymentAddress" value="paymentEdit" switchType="server" stateOrder="paymentEdit,paymentRead">
      
       <f:facet name="paymentEdit">
       <h:panelGrid columns="2">
      
       <h:outputText value="#{bundle.address_lastname}"/>
       <h:inputText value="#{JSFAddressBean.lastName}" type="text"/>
      
       <f:facet name="footer">
       <rich:toggleControl for="paymentAddress" action="#{JSFAddressBean.paymentStateToRead}" value="save address"/>
       </f:facet>
      
       </h:panelGrid>
       </f:facet>
      
       <f:facet name="paymentRead">
      
       <h:panelGrid columns="2">
      
       <h:outputText value="#{bundle.address_lastname}"/>
       <h:inputText value="#{JSFAddressBean.lastName}" disabled=false" type="text"/>
      
       <f:facet name="footer">
       <rich:toggleControl for="paymentAddress" value="update address"/>
       </f:facet>
      
       </h:panelGrid>
      
       </f:facet>
      
       </rich:togglePanel>
      </h:form>




      So i have to panels:
      1. one for editing the form:

      <h:inputText value="#{JSFAddressBean.lastName}" type="text"/>

      2. one for reading the form where the input is disabled:

      <h:inputText value="#{JSFAddressBean.lastName}" disabled=false" type="text"/>


      NOW only in the editing mode should be the given action performed:

      action="#{JSFAddressBean.paymentStateToRead}"

      The debugger jumps in that action method but the input in the inputText is never been read. This means everything works like it should, only when u write something in the inputText field it is never read.

      Anybody some hints what I'm doing wrong?

      Thanks, Norbert