views:

20

answers:

1

Hello,

Does anyone know if it is possible to display nested tables using ICEFaces? For example in my system:

SuperOrders are comprised of individual standalone Orders and always either one or two Orders. The user has the ability to search on SuperOrders, but they also want to see the standalone Orders underneath in the search results.

I don't want to display this as a tree, I would rather display it as a table with rows of SuperOrders and the Orders underneath AND I would like the table showing the Orders underneath to be collapsible so that the Orders can be hidden.

Finally, ANY row in this result table must be selectable, meaning the user can select a SuperOrder and view details or select a standalone Order underneath a SuperOrder and view details.

What is the easiest way to do this with ICEFaces? I tried using collapsible panels with the panel representing the SuperOrder and the table inside representing an Order, but it is too hard to 'select' the SuperOrder this way.

A: 

You can generate nested tables in IceFaces. From above mentioned information, I think SuperOrder contains list of Orders.

Below is the sample code to access Orders from SuperOrders by specifying its variable name in sub table.

<ice:dataTable id="superOrder" value="#{beanName.superOrdersList}" var="**superOrder**">

         //... some components to display of Main Entity

             <ice:dataTable id="subOrder" var="details" value="#{**superOrder**.subOrderList}">

                 //... some components to display of Sub Entity contained in Main Entity

             </ice:dataTable>

        </ice:dataTable>
Nayan Wadekar