Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display multiple rich:dataTables

 
srikanth Thandra
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18154
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic