Another possibility, if your column 2 list is really just a simple list,
would be to not use displaytag for the nested table, but just to jstl to
output the data.  Nested tables are really useful and may be just what you
need, but they can also add some complications when managing paging and
stuff like that.

So you could do:

<display:table name="list" uid="person">
   <display:column property="name"/>
   <display:column title="Pets">
      <c:forEach var="pet" items="${person.pets}">
         <a href="Pet.jsp?id=${pet.petID}">${pet.name}</a><br/>
      </c:forEach>
   </display:column>
</display:table>

Something like that.  Of course, like I said, this gives you no paging,
sorting, or anything else for the list of pets, so it depends on what sort
of things you want displaytag to automate for you.

Jorge Barroso wrote:
> Yes, nested tables,
> http://displaytag.homeip.net/displaytag-examples-1.1/example-nestedtables.jsp,
> but it does not support exporting.
>
> -J
>
> Mississippi John Hurt <[EMAIL PROTECTED]> wrote: Can displaytag render a
> table with rows that have a column that's actually a List of 1 or more
> rows?
> For instance a table of Person, with column1=name, column2 is a List of
> Pets, so there could be multiple rows for each pet for each person.
>
> Ideally I'd like to pass a Person object which contains a List of Pet.
> Each Pet has a Name and PetID property. I'd need the PetName to display in
> html, and the PetID to build a link to a Pet.jsp page loaded with that Pet
> info.
>
> Can this be done with display tag?
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> displaytag-user mailing list
> displaytag-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call
> rates.
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> displaytag-user mailing list
> displaytag-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>


-- 
Rick Herrick
[EMAIL PROTECTED]

I haven't got time for inner peace.

"No reasonable definition of reality could be expected to permit
this."--Albert Einstein, Boris Podolsky and Nathan Rosen in 1935



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to