我想在我的管理组件中使用DataModel和DataModelSelection注释。
@Name("myComponent")
@Scope(CONVERSATION)
public class MyComponent {
@DataModel
private List<Item> myDataModel;
@DataModelSelection
@Out(required=false)
private Item selectedItem;
....
}
假设我想制作一个模式面板,我想在其中显示选定的项目数据。 不幸的是,在模态面板中,注释为DataModelSelection的属性“selectedItem”为空......
<rich:dataGrid value="#{myDataModel}" var="something">
....
<a4j:commandButton oncomplete="show my edit panel" ..../>
....
</rich:dataGrid>
<rich:modalPanel>
....
<h:inputText value="myComponent.selectedItem"/>
</rich:modalPanel>
有没有办法在数据网格之外使用选定的数据?
另一件事是我不能在dataGrid 值属性中使用“myComponent.myDataModel”,而只能使用 myDataModel。在其他情况下,如果我想使用某个类作为另一个类的基础,它可能会出现问题。
有什么建议么?
提前致谢。