[jboss-user] [JBoss Seam] - @DataModelSelection always outjects first value in list

paulharrington do-not-reply at jboss.com
Tue May 8 17:35:29 EDT 2007


I have a class which acts as a backing bean for a page with a datatable. A second class acts as a backing bean for a form, which alows a selected value from the table to be edited.

In the first class I use the @Datamodel component to outject the list, and the @DataModelSelection to outject the selected item.

The second class uses the @In annotation to pick up the selected value.

The problem is that Regardless of which value I click on my list in the xhtml page, the first entry in the list is always outjected, and hence picked up by the second component.

I am using seam 1.2.1

Can anyone help?

thanks

Paul
(below is the code for how I use the @DataModel, and @DataModelSelection annotations:

-----------------------------------------------

@SerializedConcurrentAccess @Synchronized @Name("appUserListAction")
@Stateful
public class AppUserListActionImpl 
{
....
    @DataModelSelection
    @Out(required = false)
    private AppUser appUser;

    @DataModel(scope = ScopeType.PAGE)
    private List myCurrentPage;

    @Factory("myCurrentPage")
    @Begin
    public void initCurrentPage()
    {
        myCurrentPage = getService().getCurrentPage();
    }
}



@Name("appUserAction")
@Scope(ScopeType.CONVERSATION)
public class AppUserActionImpl {
....
        @In(required = false, create = true)
        private AppUser appUser;
....
}


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

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



More information about the jboss-user mailing list