struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@attws.com>
Subject RE: iterate tag - can you set an increment?
Date Tue, 19 Nov 2002 21:24:37 GMT
No, I'm afraid Struts-EL is only in the nightly build, until we release a new 1.1 beta, or
the final 1.1 release.  However, the Struts nightly build has been quite stable for quite
a while now.  I can't say much about any particular build number.

> -----Original Message-----
> From: Andy Kriger [mailto:akriger@greaterthanone.com]
> 
> Is logic-el in 1.1b2? Or do I need a more recent build? (and 
> if I do, what
> is the most stable recent build :) - I'm mid-project and 
> don't want to deal
> with finicky dev builds right now)
> 
> -----Original Message-----
> From: Karr, David [mailto:david.karr@attws.com]
> Sent: Tuesday, November 19, 2002 13:11
> To: Struts Users Mailing List
> Subject: RE: iterate tag - can you set an increment?
> 
> 
> You can either use the JSTL for this, or Struts-EL, using the
> "logic-el:match" tag, which is the ONLY tag (ok, along with
> "logic-el:notMatch") which I added additional attributes to 
> in the Struts-EL
> port.  I added an "expr" attribute to those tags, to make it 
> convenient to
> specify an arbitrary EL expression.  Using this, you could do 
> something
> like:
> 
>   <logic-el:match expr="${idx mod 2}" value="0">
> 
> > -----Original Message-----
> > From: Andy Kriger [mailto:akriger@greaterthanone.com]
> >
> > And last but not least, is it possible to do test in 
> logic:equal that
> > involve equations? For example, is index%2==0? (or do I need
> > JSTL for this)?
> >
> > -----Original Message-----
> > From: Karr, David [mailto:david.karr@attws.com]
> >
> > Certainly.  It's available as a scripting variable within the
> > loop (and as a
> > page-scoped attribute).
> >
> > > -----Original Message-----
> > > From: Andy Kriger [mailto:akriger@greaterthanone.com]
> > >
> > > Is it possible to access the idx variable in a scriplet
> > > during iteration?
> > >
> > > -----Original Message-----
> > > From: Andy Kriger [mailto:akriger@greaterthanone.com]
> > >
> > > Is there any way to set an iteration increment on the
> > iterate tag? For
> > > example, iterate through the array returning every 2nd item.
> > >
> > > If not, can anyone tell me how I might do this without 
> resorting to
> > > scriplets (or only using them minimally)? Here's the code I'm
> > > trying to use.
> > > The first TD is the long_desc field of array[idx] in
> > myBean. How can I
> > > increment idx so I can get the next item? (maybe I'm being
> > > slow since I
> > > haven't had my coffee yet)
> > >
> > > <logic:iterate id="idx" name="myBean" property="array"
> > > scope="session">
> > > 	<tr>
> > > 	<td><bean:write name="idx" property="long_desc"/></td>
> > > 	<td><bean:write name="???" property="long_desc"/></td>
> > > 	</tr>
> > > </logic:iterate>
> 
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message