DataScroller组件未按预期重新舍入

时间:2014-11-13 10:50:10

标签: jsf richfaces

我有2个dataScrollers,高于和低于dataTable。 Bottom卷轴工作正常,但Top卷轴没有按预期重新渲染。它显示以前结果的页码。即Top dataScroller落后一步。 以下是我的代码。

<h:panelGroup id="groupid">
    <h:panelGrid id="searchgrid" rows="4" rowClasses="alignCenterTop"
    rendered="#{DataModel.renderGrid}">
    <h:panelGroup columns="1" columnClasses="pgnBarCenter">

    <rich:datascroller align="center" for="datatable"  page="#{DataModel.page}" 
                            actionListener="#{DataModel.actionListenerEventForDatascroller}"
                            limitToList="true" ajaxSingle="true" fastControls="hide" 
                            renderIfSinglePage="false" reRender="btmCounter,bottomSC" id="topSC"
                            >
                            <f:facet name="first">
                                   <h:outputText value="#{msg.pag_first}" />
                            </f:facet>
                            <f:facet name="first_disabled">
                                   <h:outputText value="#{msg.pag_first}" />
                            </f:facet>
                            <f:facet name="last">
                                   <h:outputText value="#{msg.pag_last}" />
                            </f:facet>
                            <f:facet name="last_disabled">
                                   <h:outputText value="#{msg.pag_last}" />
                            </f:facet>
                            <f:facet name="next">
                                   <h:outputText value="#{msg.pag_next}" />
                            </f:facet>
                            <f:facet name="next_disabled">
                                   <h:outputText value="#{msg.pag_next}" />
                            </f:facet>
                            <f:facet name="previous">
                                   <h:outputText value="#{msg.pag_prev}" />
                            </f:facet>
                            <f:facet name="previous_disabled">
                                   <h:outputText value="#{msg.pag_prev}" />
                            </f:facet>
                     </aap:dataScroller>
               </h:panelGroup>

        <rich:dataTable id="datatable" width="100%"
        value="#{DataModel}" var="gridRow"
        columns="5"  rows="10" columnClasses="alignLeft,alignLeft,alignLeft,alignLeft,alignLeft" rowClasses="row1,row2"
        onRowMouseOver="this.style.backgroundColor='#B5F3FB'"
      onRowMouseOut="this.style.backgroundColor='#{a4jSkin.rowBackgroundColor}'"
      reRender="btmCounter,bottomSC,topSC">
            <rich:spacer width="4" />
            <rich:column width="2%">
                <f:facet name="header">
                    <h:outputText value="Select"/>
                </f:facet>
                <h:panelGroup id="test123">
                <h:selectBooleanCheckbox id="gridChkBox"
                                   value="#{gridRow.rowSelected}"/>
                            </h:panelGroup>
            </rich:column>
....................
        <rich:column width="9%" sortable="true" id="datatableid"
                label="#{msg.ID}"
                sortBy="#{gridRow.ID}"
                filterBy="#{gridRow.ID}:String">
                <f:facet name="header">
                    <h:outputText value="#{msg.costCktID}" />
                </f:facet>
                <h:outputText value="#{gridRow.ID}"/>
            </rich:column>           
            <rich:spacer width="4" />

        </rich:dataTable> 

    <h:panelGrid columns="1" row="1" width="100%" columnClasses="pgnBarRight">                                  
<h:panelGroup styleClass="pageCountText">
           <h:outputText value="Total Records: " />
           <h:outputText id="btmCounter"
            value="#{DataModel.totalRecords}">
            <f:convertNumber pattern="##,###,###" />
           </h:outputText>
      </h:panelGroup>
 </h:panelGrid>
 <h:panelGrid columns="1" columnClasses="alignCenter" width="100%">
    <rich:datascroller align="center" for="datatable" page="#{DataModel.page}" 
                            actionListener="#{DataModel.actionListenerEventForDatascroller}" 
                            fastControls="hide"
                            renderIfSinglePage="false" limitToList="true" ajaxSingle="true" 
                            reRender="btmCounter,topSC" id="bottomSC">
                            <f:facet name="first">
                                   <h:outputText value="#{msg.pag_first}" />
                            </f:facet>
                            <f:facet name="first_disabled">
                                   <h:outputText value="#{msg.pag_first}" />
                            </f:facet>
                            <f:facet name="last">
                                   <h:outputText value="#{msg.pag_last}" />
                            </f:facet>
                            <f:facet name="last_disabled">
                                   <h:outputText value="#{msg.pag_last}" />
                            </f:facet>
                            <f:facet name="next">
                                   <h:outputText value="#{msg.pag_next}" />
                            </f:facet>
                            <f:facet name="next_disabled">
                                   <h:outputText value="#{msg.pag_next}" />
                            </f:facet>
                            <f:facet name="previous">
                                   <h:outputText value="#{msg.pag_prev}" />
                            </f:facet>
                            <f:facet name="previous_disabled">
                                   <h:outputText value="#{msg.pag_prev}" />
                            </f:facet>
                     </aap:dataScroller>
               </h:panelGrid>
    </h:panelGrid>
</h:panelGroup>

请原谅我的英语..任何人都可以为我提供解决方案

0 个答案:

没有答案