1 Reply Latest reply: May 7, 2012 3:14 PM by Andrej Podgorsek RSS

Walk method in session scoped beans executes every time - modal panel!

Andrej Podgorsek Newbie

Hi. I use RF4.2 on JBoss 7.1.1. Final.

 

I have multiple modal popuppanels each with extended datatable inside defined on the same page and they commonly open one on another (project specification).

 

Extended datatable backingbeans (@Named @Sessionscoped) extend ExtendedDataModel and implement the methods as described in Practical Richfaces 2nd edition, so the tables have DB paging. (they pull 10 rows). These popup (modal) panels go 3 levels deep.

 

When I click, for example datascroller on 2nd level, I see in logs that also walk method in 0th and 1st level are getting executed, and they execute like 300ms, whick is a lot. Also U can imagine that on 3rd level, at least 4 different walks are executed, so the actions take more than 1-2second, which in unacceptable.

 

I have lazy loading of popupanels implemented this way:

 

<h:panelGroup id="includeFoo" >

                                        <a4j:outputPanel id="outputPanelFoo" rendered="#{Foo_CONTROLLER.rendered}">

                                                  <ui:include src="#{Foo_CONTROLLER.url}" />

                                        </a4j:outputPanel>

                              </h:panelGroup>

 

 

Please help...the WALK methods are gettitng executed TOO MANY TIMES, and also on wrong controllers (cascading).

  • 1. Re: Walk method in session scoped beans executes every time - modal panel!
    Andrej Podgorsek Newbie

    Maybe some more hints about weird behaviour...I have selection implemented as to sample in showcase, via a4j:ajax execute @this.

     

    When I do extdt selection (via selectionlistener method), it does getrowdata() on whole 10 rows which I am displaying, so it goes to database 10 times. Why is it so? Isn't it natural to only go to database (getrowdata) for the one element, which you have selected? Should I implement some kind of caching mechanism? What is the best practice for this?