This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a collection that might contain 5 or 7 values. it might vary, but I want them to display in 3 rows by 3 columns by using iteration tag. so the tricky thing is that I don't know how to put "<br>" after each 3rd and 6th value. I am just wondering if it is possible to use it with Struts' currently existing tags or I have to create my own tags.
As Sanat Kumar Padhy previously said, you won't have to create your own tags for this. The only thing is, as far I as know, you propably won't be able to manage this 100% with Struts. You will need a little bit of Java in your JSP.
For example :will give you access to any data of your collection plus an indexId wich will be useful to know where you are in your iteration.
Then, while iterating on your data, a simple Java code such aswill give you the control of your table structure.
Note : Pay attention, the indexId value may be zero based
PS: If someone know how do that without any Java code, only with Struts tags, please let us know. [ March 15, 2005: Message edited by: Franck Tranchant ]