Pavla Novakova wrote:
> Hi,
>
> sorry for my previous post - it was sent by accident. So the whole 
> question is:
>
> I would like to display property of type java.util.List on my base 
> object: for example:
>
> <d:table id="order" name="orderList">
>         <d:column property="number" title="Number" />
>         ... and some more simple columns
>         <d:column property="orderItems" title="Order items">
>             <ul>
>              <c:forEach items="${order.orderItems}" var="item">
>                      <li>${item.name}</li>
>              </c:forEach>
>             </ul>
>        </d:column>
> </d:table>
>
> This works, but it creates same row for each of order items, which is 
> not desired - I would like simply to display list of items in single 
> table cell. Please advise, ... I believe that must be quite simple, 
> but I'm missing something.
>
> Thank you very much for any suggestions.
> Best regards, Pavla Novakova
>
>

So you're giving displayTag a list of Orders but want it to show a list 
of OrderItems?

Does your OrderItem object have a reference to the parent order? If so 
then you can create a List of OrderItems and use:

<d:column property="order.number" title="Number" />

to get the properties of the Order (provided your OrderItem object has a 
getOrder() method.

Otherwise you may have to resort to using a Decorator and appending rows 
to the table in the finishRow() method for each OrderItem.

Ed!

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to