Menu

Nested table examples all broken.

2006-03-30
2012-10-09
  • Laran Evans

    Laran Evans - 2006-03-30

    I've searched the SF forums, Google, the displaytag web-site, examples, all over the place. And NOWHERE have I found an example of how to get nested tables working. There are a few examples, but none of them work.

    I have a List of Lists. I want an outer table to iterate the outer list. Then, due to some formatting requirements involving mixing in other data, each element of the outer List (also a List) needs to show up as a table with a single row. This inner table will have headers for the column names. So, the page will look like one big list with alternating rows, one row of column headers followed by one row of data, etc.

    So, in pseudo-html:

    <outerTable>

    <innerTable>
    <headerRow />
    <dataRow />
    </innerTable>

    <innerTable>
    <headerRow />
    <dataRow />
    </innerTable>

    </outerTable>

    Can anyone fill in the display tag code to make this happen?

    Many thanks.

     
    • Laran Evans

      Laran Evans - 2006-03-30

      One follow-on note to this.

      I can't use c:forEach to iterate the inner lists because I'm going to need this nested list structure to function correctly with the export functions. Using a c:forEach would cause incorrect formatting in Excel and cause html etc to show up in CSV files, etc.

      Thanks.

       

Log in to post a comment.

MongoDB Logo MongoDB