struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Lin" <vince_li...@yahoo.com.tw>
Subject The index number of iterate tag
Date Fri, 24 Aug 2001 08:26:06 GMT
Hi,

Could any one tell me how to get the index number in a iterate tag? For example, I want to
show a html table in screen like below. 

No. 	Name.	Address    ......
-----------------------------------------------
1	AAA        XXxxxx
2	BBB	xxYyyyy
3	CCC	ffxxxxxx
..........

And I have a collection of objects which have attribute name and address ... etc. I can use
<logic:iterate> to display this collection. But I don't know how to get the item number
number. Now, I use a variable i and use scriptlet <%= ++i %> in JSP, but I think the
codes are ugly. Is there a tag or implicit variable to get the index number of <logic:iterate>
?

Regards,
Vincent                                          Ч:бТєі ЧgГ╩ІФ~иъ &АбЈ▄бfЮvиг▒ФaХ┌  щџі_Ыj(§╩&
Mime
View raw message