5 Replies Latest reply on Aug 6, 2008 3:08 AM by fstof

    reRender from within region not working

    fstof

      Hey guys...
      I have a page with the following region on it

      <a4j:region id="myWorkRegion" renderRegionOnly="true">
      ...
      <a4j:commandButton value="Whatever" action="theAction" reRender="anotherPanel" />
      ...
      </a4j:region>


      Now when the button is clicked inside the region and tries to reRender anotherPanel wich is outside the region it does not rerender that panel at all.

      Any ideas?
      Thanks in advanced

        • 1. Re: reRender from within region not working

          Hi, fstof,

          The a4j:region documentation page (http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/region.html), explains the "renderRegionOnly" attribute:


          Flag to disable rendering in AJAX responses content outside of active region. If this attribute set to "true" , no one of the components outside of region will be included to AJAX response. If set to "false", search for components to include in response will be performed on all tree. Default value is "false".


          Try to use renderRegionOnly=false :)

          • 2. Re: reRender from within region not working
            fstof

            Thanks fernando
            I should have said this in the first post
            But I'm running this inside a tabpanel, and if I dont have the renderRegionOnly="true" when I work on one tab, all the other tabs' get decoded, and this is a great performance loss

            But you are in fact correct that if I change it to false it works... but then also breaks something else...

            is there no other way?

            • 3. Re: reRender from within region not working
              shadowcreeper

              You can have it run another jsFunction oncomplete that is outside the region which will reRender the desired component.

              • 4. Re: reRender from within region not working
                fstof

                 

                "shadowcreeper" wrote:
                You can have it run another jsFunction oncomplete that is outside the region which will reRender the desired component.


                This sounds like it could work... could you give me an example of how I would do this...?


                • 5. Re: reRender from within region not working
                  fstof

                   

                  "fstof" wrote:
                  "shadowcreeper" wrote:
                  You can have it run another jsFunction oncomplete that is outside the region which will reRender the desired component.


                  This sounds like it could work... could you give me an example of how I would do this...?


                  nevermind... got it working Thanks a lot Shadow...

                  here is what I did

                  <a4j:jsFunction name="updateTheOtherPanel" reRender="anotherPanel"/>
                  
                  <panel id="anotherPanel">
                  ...
                  </panel>
                  
                  <a4j:region id="myWorkRegion" renderRegionOnly="true">
                  ...
                  <a4j:commandButton value="Whatever" action="theAction" oncomplete="updateTheOtherPanel()" />
                  ...
                  </a4j:region>