• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

display multiple rich:dataTables

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>

<h:outputText value="#{listValue.heading1}"/>
<rich:dataTable value="#{listValue.anotherList}" var="value2" style="display:none">
display items code here....
</rich:dataTable>
</rich:column>
<rich:column>
<h:outputText value="#{listValue.value1}"/>
</rich:column>
<rich:column>
<h:outputText value="#{listValue.heading2}"/>
</rich:column>
<rich:column>
<h:outputText 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?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic