struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ets04uga <>
Subject OGNL Iterator/Array Expression Question
Date Tue, 15 Sep 2009 01:01:58 GMT

I have the following code:

<s:property value="periodModel.weeks.iterator.{? true }[0].startDate"/> 

based on example code provided in the OGNL guide to get the startDate from
the first object in a returned array from the iterator.

I would like to make the 0 dynamic based on the 'wno' property so that I
could do something such as:

<s:property value="periodModel.weeks.iterator.{? true }[wno].startDate"/> 

where wno might be the value 0,1,2, etc...

But I do not know the correct syntax.  I was reviewed the OGNL guide and am
still a little new using OGNL expressions.

Can someone offer some guidance?

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message