struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ets04uga <ets04...@yahoo.com>
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?

Thanks,
Eric
-- 
View this message in context: http://www.nabble.com/OGNL-Iterator-Array-Expression-Question-tp25446210p25446210.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message