[jboss-user] [JBoss Seam] - DataModelSelection problem

monkeyden do-not-reply at jboss.com
Mon Oct 2 10:49:05 EDT 2006


I am currently displaying a search results screen, each of which has a link to a detail screen.  Classic scenario.  The selected row is to be injected into the backing bean, added to session and made available to the next screen.  

The problem is, the first row is always injected, no matter which I select on the client, despite the fact that each of the rows has unique ids assigned ("_id0:results_0:_id7", "_id0:results_1:_id7", "_id0:results_2:_id7", etc).


Here is how I have the to-be-selected object defined in the backing bean:


  | @Stateful
  | @Scope(ScopeType.SESSION)
  | @Name("usersearch")
  | public class UserSearchAction implements UserSearch, Serializable {
  | ...
  |     @DataModel
  |     @Out(required=false)
  |     private List<UserView> users;
  | 
  |     @DataModelSelection
  |     @In(required=false)
  |     @Out(scope=ScopeType.SESSION, required=false) 
  |     private UserView user;
  | ...
  | }
  | 


The action method just returns the next page in the flow.


  | public String select() { 
  |     return "refresh-page";
  | }
  | 

Thanks for the advice.

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

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



More information about the jboss-user mailing list