I'm trying to create a grid of images using struts-tags, which starts a new line every 4 images (1,2,3,4 new line 5,6,7,8 new line 9...) I did a similar thing ages ago using standard JSTL, but now we are just using struts-tags.
I have tried to implement the issue in the same way and have the below code, bit the var 'count' is not getting set the images are never going to a second line.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Kevin P Smith
Joined: Feb 18, 2005
Sort of, but that would give me every other item in the list (I believe there is a .even argument as well). What I want to do is every 4th (or 5th) item; so that I can create a 'grid' of images
img1 img2 img3 img4
img5 img6 img7 img8
So something like
counter = 1
So everytime the counter gets to 5, we create a new line and reset the counter.
I've done it in standard JSTL, but do not know how/if you can do it with struts2 /struts-tags