2 Replies Latest reply on Feb 16, 2011 12:52 PM by robertgary1

    a4j:commandButton inComplete action??

    robertgary1

      Richfaces 3.3.3.Final JBoss AS 6.0.0.Final

       

      I'm looking for a way that I can perform an operation after the backing bean action has completed. I've tried...

       

              <a4j:commandButton value="editButton" image="/xxx/images/modify.gif" action="#{backingBean.edit}"

                       oncomplete="Richfaces.showModalPanel('editPanel');"/>

       

       

      However, the panel is still displayed before the backing bean has a chance to run its edit method. I'm I misunderstanding the onComplete action?

       

      -Robert

        • 1. a4j:commandButton inComplete action??
          mp911de

          Hi Robert,

          oncomplete is invoked after your action. If your Modal Panel contains something, that is done by your action, try to rerender your Modal-Panel, because the content is not updated on showModalPanel.

           

          Something like

           

          <a4j:commandButton value="editButton" image="/xxx/images/modify.gif" action="#{backingBean.edit}" reRender="editPanel"

                           oncomplete="Richfaces.showModalPanel('editPanel');"/>

           

          should help.

           

          Best regards,

          Mark

          • 2. a4j:commandButton inComplete action??
            robertgary1

            Yes, that worked. Thank you.