2 Replies Latest reply on Apr 21, 2008 2:06 PM by Daniel Behrwind

    Updating <rich:dataScroller> after <a4j:support> request

    Daniel Behrwind Newbie


      I'm implementing a forum using Seam, <rich:dataTable> and <rich:dataScroller> pretty much the same way as described here: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112998

      My forum allows categorizing topics and provides a <h:selectOneMenu> to filter topics by their categories. Basically it works like this: The user selects an item from the <h:selectOneMenu>, which causes an ajax request updating the content of the <rich:dataTable> that provides the topics.

      The problem is that the dataTable's dataScroller gets updated before the new value of the selectOneMenu is applied, which results in a flawed presentation of the number of rows (it always displays the quantity for the previously selected category).

      Here's the JSF code:

      show topics:
       <h:selectOneMenu value="#{forumEntryFilter.selectedCategory}">
       <s:selectItems value="#{forumEntryFilter.categories}" var="category" label="#{category}" />
       <a:support event="onchange" reRender="forumList" />
      <rich:dataTable value="#{forumEntryDataModel}" var="topic" rows="20" id="forumList">
       <rich:column style="width: 70%;">
       <rich:column style="width: 30%;">
       <f:facet name="footer">
       <rich:datascroller id="scroller" />

      Any help is appreciated!