Hi seam people,
i still have problems understanding the seam DataModel Annotation. What i am trying to do is, having a temporary list of items where i can select one of them. So far so good, but now i dont need the list anymore, i just need the selected item to be outjected to a context like SESSION (or better CONVERSATION).
My service bean should be a stateless one without assining a scope like SESSION or somthing. As i read in the documentation of @DataModel it should automatically be asigned to the EVENT context. Shouldn't that mean that i can acces the selected value in the action method called when selecting this item?!? But its not there!
Here some code examples:
@Stateless
@Name("Service")
public class Service implements IService {
@DataModel(value = "list")
private List<Item> items;
@DataModelSelection(value = "list")
@Out(value = "item", required = false, scope = ScopeType.SESSION)
private Item item;
}I normally call the action with a s:link in the data table.
Can somebody please give me a hint.