1 Reply Latest reply on Jan 27, 2011 1:28 AM by Ilya Sorokoumov

    commandButton with rendered attribute not firing action

    Mudassar Hanif Newbie

      Hi,

      I am facing some problem using a4j:commandbutton with rendered attribute. I have two buttons with same action attribute, with different rendered attribute.

      Here is the code for two buttons.

       

       

      <a4j:keepAlive beanName="adminHomePageBean" />
      ...
      
      <a4j:commandButton
           rendered="#{confirmMsgDialogBean.isUserActive}"
           value="Deactivate User"
           action="#{adminHomePageBean.updateUserStatusAction}"
           reRender="usersPanel">
      
                <f:param name="username" value="#{confirmMsgDialogBean.userName}" />
      
      </a4j:commandButton>
      
      <a4j:commandButton
           rendered="#{not confirmMsgDialogBean.isUserActive}"
           value="Activate User"
           action="#{adminHomePageBean.updateUserStatusAction}"
           reRender="usersPanel">
      
                <f:param name="username" value="#{confirmMsgDialogBean.userName}" />
      
      </a4j:commandButton>
      

       

       

      The buttons are rendered as they should be. But the action of the commandbutton is not invoked. there is also a4j:

      I am using richfaces 3.3.3

       

      Regards,

      Raja