struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Thibaudeau" <pierre.thibaud...@gmail.com>
Subject [S2] using <s:iterator> for a sequence of integers
Date Sun, 15 Jun 2008 02:26:06 GMT
Is there a simple syntax with <s:iterator> or <s:generator> for displaying a
sequence of integers from 0 to N-1 ?
(The value of N is not known at compile time.)

At the moment, the only way I can think of doing this is not very appealing:
Within the action, create an ArrayList and populate it with the sequence of
integers.  Then iterate over that list with <s:iterator>.

Is there an easier way?  Something that would not involve the action?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message