3 Replies Latest reply on Dec 14, 2007 8:34 AM by Jonck van der Kogel

    rich:datascroller refresh problem

    Jonck van der Kogel Newbie

      Hi all,
      I'm having some problems with the rich:datascroller component. I've queried this forum extensively but could not find an answer.

      We have a search window with some search fields and a search button. The results are then shown in a rich:dataTable with a rich:datascroller to navigate the results. The following scenario then causes problems:
      I first do a query with multiple pages of results.
      I then do a query which returns only a single page of results, however, the page numbers above 1 are also shown at this time. If I then do the same query (which returns a single page of results) again, the page numbers disappear and the datascroller is "in sync".
      If I then do a query that returns multiple pages of results again the page numbers do not show up. Running the same query again results in the page numbers being shown correctly.

      Here is my code:

      <a4j:commandButton id="org_zoeken" type="submit"
       reRender="resultaat_organisatie"
       value="#{msgZoekOrganisatie.nc_knop_zoeken}"
       action="#{zoekorganisatie.search}" styleClass="knop"
       onmouseup="this.className='knop';"
       onmousedown="this.className='knopklik';"
       onmouseout="this.className='knop';" />
      
      <t:div id="resultaat_organisatie">
      <rich:datascroller for="organisatietabel" fastControls="hide" binding="#{zoekorganisatie.dataScroller}" >
       <f:facet name="first">
       <h:outputText value="Eerste" />
       </f:facet>
       <f:facet name="last">
       <h:outputText value="Laatste" />
       </f:facet>
       <f:facet name="next">
       <h:outputText value="Volgende" />
       </f:facet>
       <f:facet name="previous">
       <h:outputText value="Vorige" />
       </f:facet>
      </rich:datascroller>
      <rich:dataTable id="organisatietabel" styleClass="nieuweinspectie"
       value="#{zoekorganisatie.results}" var="res" rows="10">
       <f:facet name="header">
       <rich:columnGroup>
       <h:column>
       <h:outputText value="#{msgZoekOrganisatie.nc_zoek_handelsnaam}" />
       </h:column>
       </rich:columnGroup>
       </f:facet>
       <h:column>
       <a4j:commandLink action="zoekorganisatie.select"
       value="#{res.handelsnaam}" reRender="#{reRender}"
       oncomplete="#{hideJavaScript}">
       <f:setPropertyActionListener value="#{res}"
       target="#{entityBean[field]}" />
       </a4j:commandLink>
       </h:column>
      </rich:dataTable>
      </t:div>
      


      Does anyone have any idea how to fix this?

      Thanks very much, Jonck