Mike,

A question is this collection been generated from a database via a sql statement, because if it is you would be able to change the sql to "group by" the "EmpID" which would get you almost all the way to the output you want. All that would be left is to do a bit of scripting to only display the "EmpID" when it changes.



*************************************
Ruben Cepeda
[EMAIL PROTECTED]
*************************************





----Original Message Follows----
From: "Mike Young" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Creating List Catgeories from a Single Collection
Date: Sun, 22 Aug 2004 18:38:40 +1000

I have a collection that contains the following data:
EmpId   CourseId        Date_Taken      Assessment
1234    1               01/01/2000      PASS
1234    2               01/02/2001      PASS
1234    4               01/05/2002      PASS
1234    1               01/04/2003      PASS
1432    1               01/06/2002      PASS
1432    2               01/08/2004      PASS
1432    1               01/06/2004      PASS

I would like to display the data as follows:
EmpID: 1234
CourseID        Date_Taken      Assessment
1               01/01/2000      PASS
1               01/04/2003      PASS
2               01/02/2001      PASS
4               01/05/2002      PASS
EmpID:1432
1               01/06/2002      PASS
1               01/06/2004      PASS
2               01/08/2004      PASS

I have looked at the display tag library but this will not produce this
output.
I have also looked at the taglibs-iterator library but can't see how I
would use this with bean collections (without writing lots of jsp)
I have also looked at nested - but all the examples seem to use two
collections to iterate around.

Whats the most efficient / best way of acheiving my end output?


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to