0

I have the page structured like this:

Data Scroller
Datatable :
 - Header
 -  Data
 -  Footer
Data Scroller

Now, I want the Data Scrollers and the footer to be re-rendered when the page is changed. To do this i am calling a bean that returns the ID's of the fields to be changed under the reRender tag in the dataScrollers. The problem however is that the data scrollers are being reRendered but the footer isn't. The method that is called in the footer is never being called again, but i know that the list of reRender id's is correct.

I have the following code:

  <h:form title="detailView">

...

<rich:dataScroller align="center" for="attendanceList" maxPages="10"
        renderIfSinglePage="false" faststep="4"
        page="#{attendance.scrollerPage}" reRender="#{attendance.getRefreshIds(attendance.SourceSc2)}" id="sc1" ajaxSingle="false"/>
<rich:dataTable width="500" id="attendanceList"
        rows="#{attendance.getDatesAmount()}" columnClasses="attendance"
        value="#{attendance.getAttendanceList(myEmp)}" var="a">
    <f:facet name="header">

...

</f:facet>
<h:column>
    <h:outputText value="#{a.dayOfWeek}" />
</h:column>

...

<h:column>
    <h:outputText value="#{a.totalTime}" />
</h:column>
<f:facet name="footer" id="tot">
    <rich:columnGroup>
    <h:column></h:column><h:column></h:column><h:column></h:column><h:column></h:column><h:column></h:column><h:column></h:column><h:column></h:column><h:column></h:column><h:column></h:column>
<h:column> <b><h:outputText value="Total" /> </b></h:column>
<h:column> <b><h:outputText value="#{attendance.getTotalForPage()}" /> </b></h:column> 
    </rich:columnGroup>
</f:facet>
</rich:dataTable>
 <rich:dataScroller width="400" align="center" for="attendanceList"
maxPages="20" renderIfSinglePage="false" faststep="4"
page="#{attendance.scrollerPage}" id="sc2" reRender="#{attendance.getRefreshIds(attendance.SourceSc2)}" ajaxSingle="false"/>

...

 </h:form>
mangusbrother
  • 3,988
  • 11
  • 51
  • 103
  • what is #{attendance.getTotalForPage()}? Why are you trying to call an action method from the value attribute? It looks like this should be #{attendance.totalForPage} – DaveB Feb 28 '13 at 22:31
  • nah the value is recalculated each time so it's pointless storing it anywhere. There is no variable, just the method. – mangusbrother Mar 01 '13 at 07:09

1 Answers1

1

Not sure which RF you are using (3.x?) Try putting a

<a4j:support event="onpagechange" reRender="#{attendance.getRefreshIds(attendance.SourceSc2)}"/> 

inside your <rich:dataScroller> and change h:form to a4j:form

DaveB
  • 2,953
  • 7
  • 38
  • 60