Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
22. Apr 2008, 10:05 CET | Link

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!

1 Reply:
23. Apr 2008, 18:48 CET | Link

Do not bump up your posting, read the forum policy.

 

Check out my weblog or have a look at the books I wrote.