Hi,
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 however 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:
<div> show topics: <h:selectOneMenu value="#{forumEntryFilter.selectedCategory}"> <s:selectItems value="#{forumEntryFilter.categories}" var="category" label="#{category}" /> <a:support event="onchange" reRender="forumList" /> </h:selectOneMenu> </div> <rich:dataTable value="#{forumEntryDataModel}" var="topic" rows="20" id="forumList"> <rich:column style="width: 70%;"> ... </rich:column> <rich:column style="width: 30%;"> ... </rich:column> <f:facet name="footer"> <rich:datascroller id="scroller" /> </f:facet> </rich:dataTable>
Any help is appreciated!
Do not bump up your posting, read the forum policy.