Struts iterations

G

Gordon Macleod

Hello there,

The problem I have is that I want to iterate over a ArrayList (using
Struts), grouping by a certain value.

For example, here is some data:

Country City
-----------------------------------------
France Marseille
France Paris
Germany Munich
Scotland Glasgow
Scotland Edinburgh
USA Arizona
USA Los Angeles
USA New York

How can this be done in Struts? What are the tags I require to group
this data so that I can display it in a browser like so :

France
Marseille
Paris

Germany
Munich

Scotland
Edinburgh
Glasgow

USA
Arizona
Los Angeles
New York


Many thanks in advance,

Gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top