• 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 an ArrayList within an ArrayList

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My first arraylist contains unique but different supplier categories like, (Flooring, Tiles, Carpets, etc)

My second arraylist contains details of suppliers, (name, address, email, category).

My JSP should look like this:

Flooring:

Supp1 Details (name, address, email).
Supp3 Details (name, address, email)

Tiles
Supp2(name, address, email)
Supp4(name, address, email)

Carpet
Supp5(name, address, email)

Inshort I want the first Arryalist to be displayed as header and second arraylist should be iterated and displayed under their respective category.

My JSP logic is :

<logic:iterate id="Category" name="allMySupplier_Cat">

<tr><td><bean:write name="Category" property="maincat" /></td></tr>

<logic:iterate id="Customer" name="allMySupplier_Info">

<logic:equal name="Customer" property="maincat" value=<% =Category%>

<tr><td><strong><bean:write name="Customer" property="name" /></strong></td></tr>
<tr><td><strong><bean:write name="Customer" property="email" /></strong></td></tr>

<tr><td><strong><bean:write name="Customer" property="address" /></strong></td></tr>

</logic:iterate>

My above JSp throws me error saying that setValue is underfined for logic tag equal.

Any help is apprecaited.

Thanks
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you seem to be having an issue with Struts tags, this has been moved to the Struts forum.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see a number of little issues with the jsp code as posted. I would expect it to look a little more like this:


Here are some things to look out for:
- no space between % and = in your value property
- logic:equal has the ending >
- there is an ending </logic:equal> tag

- Brent
 
reply
    Bookmark Topic Watch Topic
  • New Topic