My problem:

I'm building a table where some of the columns are determined by
looping through a collection within each of the objects that make up the
table.  Take the example of items and their associated prices.  Each
item has a different price in a different country, or it may not be
available in that country.

The table should look like so:

Item      US    Canada  Mexico
--------------------------------
Coat      $35   $40     390 pesos
Hat       $15   $17     170 pesos
Sombrero                250 pesos
Balaclava $20   $22

The code looks like:

public class Item {
  private String name;
  private List countryPrices; // List of ItemCountryPrice objects


  ... getters and setters ...
}

public class ItemCountryPrice {
  private String name;
  private BigDecimal amount;

  ... getters and setters ...
}

And the JSP looks like so:

<display:table name="items" id="item">
  <display:column property="name" title="Item"/>
  ...
</display:table>

Is there any way to define the columns based on the list of
countryPrices within each item?  I've seen several postings to the
mailing list that touch on this subject, but most are old (2004) or have
no responses.  I should also mention that I'm limited to displaytag 1.0,
due to the JDK 1.3.1 environment this app is currently running in.

Thanks,
Kyle

_____

Kyle Adams | Java Developer  |  Gordon Food Service  |  616-717-6162


_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to