[jboss-user] [JBoss Seam] - Re: how is DataModelSelection populated

iradix do-not-reply at jboss.com
Wed Jul 12 15:01:45 EDT 2006


When you annotate a List as a @DataModel what goes on behind the scenes is that Seam wraps that list in an object of ListDataModel and outjects it, by default into the conversation context.  Since the conversation context is accessible from any other seam component there is no reason you couldn't say:

@DataModel someList

then in another bean:

@In
ListDataModel someList

or maybe even

@In(value = "someList.rowIndex")
int selectedRow

In another bean.  If you injected the ListDataModel you could use the getRowIndex() method to find the selected row.  

At least I think you could :)  If so, actually adding a method to the seam ListDataModel to retrieve the selected object might be nice here.....

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

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



More information about the jboss-user mailing list