JSF,数据表中的数据表 [英] JSF, datatable in datatable
本文介绍了JSF,数据表中的数据表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以告诉我,在datatable中显示datatable的页面的后备bean应该如何。例如:
如果我想显示城市中的用户,则下面的代码将是页面的设计部分,但是bean呢?
Could someone please tell me, how should be the backing bean of a page that shows datatable in datatable. For example: If I want to show the users in the cities, the below code would be the design part of the page, but what about the bean?
<h:form><rich:dataList var="city" value="#{myBean.allCity}">
<h:outputText value="#{city.name}" ></h:outputText>
<rich:dataList var="user" value="#{city.users}">
<h:outputText value="#{user.name}" ></h:outputText>
</rich:dataList></rich:dataList></h:form>
谢谢。
推荐答案
在您的城市课程中,您应该有一个方法
in your City class you should have a method
"public List<User> getUsers()"
应在此处返回要列出的用户的适当列表。
where it should return the appropriate list of users you want to list.
它应该返回用户列表。
这篇关于JSF,数据表中的数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文