3 Replies Latest reply on Mar 28, 2012 4:51 PM by iabughosh

    How to active action method in h:commandButton in rich:popupPanel in richFaces 4.2.0

    pdhung3012

      In my case, I want to add an action to my rich:popupPanel like this:

       

       

      Header 1
      <rich:popupPanel id="popup" show="#{tC5Bean.popupCheck}"  autosized="true" resizeable="false">
               <f:facet name="header">
              <h:outputText value="Simple popup panel" />
          </f:facet>
          <f:facet name="controls">
              <h:outputLink value="#" onclick="#{rich:component('popup')}.hide(); return false;">
                  X
              </h:outputLink>
          </f:facet>
              <p>
              Hihi Click this button to hide
              <br/>
              <h:commandButton value="Close" onclick="alert('#{tC5Bean.popupCheck}')" action="#{tC5Bean.closePopupAction()}"/>
              </p>
          </rich:popupPanel>

       

       

      And the Managed Bean like this:

       

       

      Header 1
      public void closePopupAction(){
          //do some action
          popupCheck=false;
      }

       

      I also ask this question on stackoverflow: http://stackoverflow.com/questions/9863000/how-to-active-action-method-in-hcommandbutton-in-richpopuppanel-in-richfaces-4

       

      But the closePopupAction method is failed to active. I don't know what cause this and how to resolve this problem.

      If you have any idea, please share with me. You can view my error online and download our application at (please view testcase5):

      http://phandanghung.wordpress.com/2012/03/22/welcome-to-my-jsf-tutorial-project/

      Sincerely thanks.