Question

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>
Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top