You managed three different taglib prefixes in one email; that's gotta be some 
sort of record.


--- On Wed, 8/27/08, Martin Gainty <[EMAIL PROTECTED]> wrote:

> From: Martin Gainty <[EMAIL PROTECTED]>
> Subject: RE: [S2] Iterate through two lists
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Date: Wednesday, August 27, 2008, 4:35 PM
> try the simplest of scenarios such as
> <html>
> <head>
> <title>this is for milan</title>
> </head>
> <body>
> 
> <s:iterator status="stat"
> value="{1,2,3,4,5}" >
>    <!-- reference the index (start with 0 ... ) -->
>    <s:property value="#stat.index" />
> 
>    <!-- reference the top of the stack which should be
> the -->
>    <!-- current iteration value (0, 1, ... 5) -->
>    <s:property value="top" />
> </s:iterator>
> </body>
> </html>
> 
> then make that example MORE complex as needed
> different collection datatypes
> <ww:bean
> name="com.opensymphony.webwork.example.IteratorExample"
> id="it">
>   <ww:param name="day"
> value="'foo'"/>
>   <ww:param name="day"
> value="'bar'"/>
> </ww:bean>
> <p/>
> <table border="0" cellspacing="0"
> cellpadding="1">
> <tr>
>   <th>Days of the week</th>
> </tr>
> <p/>
> <ww:iterator value="#it.days"
> status="rowstatus">
>   <tr>
>     <ww:if test="#rowstatus.odd == true">
>       <td style="background:
> grey"><ww:property/></td>
>     </ww:if>
>     <ww:else>
>       <td><ww:property/></td>
>     </ww:else>
>   </tr>
> </ww:iterator>
> </table>
> then acquire values from bean defined in container:
> <webwork:iterator value="groupDao.groups"
> status="groupStatus">
>               
> <tr class="<webwork:if
> test="#groupStatus.odd == true
> ">odd</webwork:if><webwork:else>even</webwork:else>">
>                       
> <td><webwork:property value="name"
> /></td>
>                       
> <td><webwork:property
> value="description" /></td>
>                       
> <td>
>                               <webwork:iterator value="users"
> status="userStatus">
>                                       
> <webwork:property value="fullName" />
> <webwork:if
> test="!#userStatus.last">,</webwork:if>
>                               
> </webwork:iterator>
>                       
> </td>
>               
> </tr>
>       
> </webwork:iterator>
> 
> http://svn.opensymphony.com/svn/webwork/tags/webwork_2-2/docs/wikidocs/iterator.html
> 
> HTH
> Martin 
> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to
> the official business of Sender. This transmission is of a
> confidential nature and Sender does not endorse distribution
> to any party other than intended recipient. Sender does not
> necessarily endorse content contained within this
> transmission. 
> 
> 
> > Date: Wed, 27 Aug 2008 10:48:42 -0700
> > From: [EMAIL PROTECTED]
> > To: user@struts.apache.org
> > Subject: Re: [S2] Iterate through two lists
> > 
> > 
> > Hi Dave,
> > 
> > I don't understand this, what are you saying that
> I cannot use Set in jsp in
> > this way ?
> > Is there any other solution ?
> > 
> > --
> > Thx, Milan
> > 
> > 
> > 
> > newton.dave wrote:
> > > 
> > > --- On Tue, 8/26/08, Dave Newton
> <[EMAIL PROTECTED]> wrote:
> > >> (And even if you can't or don't want
> to fix it on the server-side, 
> > >> it's a 9-character fix on the JSP side.)
> > > 
> > > (Although it's not likely to do what you
> want.)
> > > 
> > > Dave
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > 
> > > 
> > > 
> > 
> > -- 
> > View this message in context:
> http://www.nabble.com/-S2--Iterate-through-two-lists-tp19052842p19185642.html
> > Sent from the Struts - User mailing list archive at
> Nabble.com.
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
> _________________________________________________________________
> Get thousands of games on your PC, your mobile phone, and
> the web with Windows®.
> http://clk.atdmt.com/MRT/go/108588800/direct/01/

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

Reply via email to