3 Replies Latest reply on May 5, 2011 4:33 AM by raid3n

    How to render rich:accordionItem after action?

    raid3n

      Hello,

       

      I have that:

       

      <rich:accordionItem id="journeys_accordionItem" header="Journeys"

                                    onclick="updateJourneys()" switchType="ajax">

      //code

      </rich:accordionItem>

       

      <a4j:jsFunction name="updateJourneys"

                          action="#{truckBeans.initJourneys}" />

       

       

      But the action "#{truckBeans.initJourneys}" is executed after the render of the accordionItem. How to solve?

       

      I'm using rf4final.

        • 1. How to render rich:accordionItem after action?
          raid3n

          Ok I solved putting an a4j:outputpanel inside rich:accordionItem

           

           

          <rich:accordionItem id="journeys_accordionItem" header="Journeys"

                                        onclick="updateJourneys()" switchType="ajax">

          <a4j:outputPanel id="outputPanel">

          </a4j:outputPanel>

          </rich:accordionItem>

           

          <a4j:jsFunction name="updateJourneys"

                       action="#{truckBeans.initJourneys}" render="outputPanel"/>

          1 of 1 people found this helpful
          • 2. How to render rich:accordionItem after action?
            lfryc

            Hi raid3n, you could use rich:accordions's itemChangeListener attribute - you would need to decide about which accordionItem is going to be switched to in the listener's method body.

            • 3. How to render rich:accordionItem after action?
              raid3n

              Thx Lukas.

               

              Now I must resolve che id for the checkbox on the rows of datatable. Because I want use the onclickrow event on the datatable to toggle checkbox on the row.

               

              onrowclick="toggleCheckbox(id)" but I haven't a defined id.

               

              sorry for my english man!