File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes display multiple rich:dataTables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "display multiple rich:dataTables " Watch "display multiple rich:dataTables " New topic

display multiple rich:dataTables

srikanth Thandra
Ranch Hand

Joined: Mar 04, 2009
Posts: 42

I am newbie to jsf!

How to display rich:dataTable between two rows of another rich:dataTable?

First Parent rich:dataTable code:

suppose that sessionScope.valueList has a size of 2. So dataTable iterates two times.

<rich:dataTable value="#{sessionScope.valueList}" var="listValue">

<hutputText value="#{listValue.heading1}"/>
<rich:dataTable value="#{listValue.anotherList}" var="value2" style="display:none">
display items code here....
<hutputText value="#{listValue.value1}"/>
<hutputText value="#{listValue.heading2}"/>
<hutputText value="#{listValue.value2}"/>

Now when i click on image rich:dataTable display style will become inline in javaScript.

But the child rich:dataTable is displaying in 1st column of parent rich:dataTable. I want it to display in between two rows of parent rich:dataTable.

how can i achieve this?

Thanx in advance,
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

To make stuff like this readable, please use the "Code" button in our message editor to wrap the code/xml/jsp text with tags that will keep it from being reformatted.

A datatable is not an "iteration". It's a 2-dimensional graphical structure. You cannot "insert another datatable between rows" because the concept of "between rows" doesn't apply. The embedded object has to be placed in a row. Or in header/footer.

You can embed a datatable as one of the cell item components of another datatable, although that would normally cause the embedded datatable to render on each row of its parent datatable. If you're creative, you can stitch 3 datatables together to give the visual appearance of a datatable "between rows". Or, since you're using RichFaces, you might find that the grouping features that the extended datatable forms will do what you want.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: display multiple rich:dataTables
It's not a secret anymore!