aspose file tools*
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
Author

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">
<rich:column>

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

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,
Srikanth
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: display multiple rich:dataTables