[jboss-user] [JBoss Seam] - Re: How to impliment a Paged + Sorted DataTable (session) wi

antispart do-not-reply at jboss.com
Thu Nov 16 11:31:39 EST 2006


"norman.richards at jboss.com" wrote : Maybe you could try a page action to refresh the data? 

Well, this would actually work great. 

Is there a way to refresh a Page scoped list in an action method?


  | private List list;
  | 
  | @Factory(value="list", scope=ScopeType.PAGE)
  | public List<Registration> getlist() {
  |    query();
  |    return list;
  | }
  | 
  | public String sort()
  |    query();
  |    return null; // reRender table only
  | }
  | 

Now, everything works great, it sorts properly, Page scope is working as expected, etc, except:

I can't outject a new value to Page scope in an Action method (or at least I dont know how to). When sort() is called, it sorts the list properly and sets the list property to the correctly sorted list but this isnt pushed out to page scope. Maybe this is because I'm returning null (the page should not be redisplayed, only a specific outputPanel should be reRendered). If I return a string then it's fine, the new data outjected to Page scope. 

So, I guess my question is is there a way to refresh the Page scoped value from an action method?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986599#3986599

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986599



More information about the jboss-user mailing list