tags:

views:

322

answers:

1

Hi,

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>

Thanks.

+1  A: 

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.

It should return User list.

erdemoo
thank you so much.