DataModel and DataModelSelection in Seam problem
I wolud like use DataModel and DataModelSelection annotations in my managing component.
@Name("myComponent")
@Scope(CONVERSATION)
public class MyComponent {
@DataModel
private List<Item> myDataModel;
@DataModelSelection
@Out(required=false)
private Item selectedItem;
....
}
Lets assume that I want to make a modal panel in which I would like to show the selected item data. Unfortunatelly the prope开发者_StackOverflowrty 'selectedItem' which is annotated DataModelSelection is null in modal panel....
<rich:dataGrid value="#{myDataModel}" var="something">
....
<a4j:commandButton oncomplete="show my edit panel" ..../>
....
</rich:dataGrid>
<rich:modalPanel>
....
<h:inputText value="myComponent.selectedItem"/>
</rich:modalPanel>
Is there any possible way to use the selected data outside the data grid?
Another thing is that I can not use the "myComponent.myDataModel" in the dataGrid value property, but simply myDataModel. In other cases it doesn't work fine what may be problematic if I would like to use some class for base to the other.
Any suggestions?
Thanks in advance.
you have to use EL syntax so; use <h:inputText value="#{selectedItem}"/>
instead of <h:inputText value="myComponent.selectedItem"/>
精彩评论