This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes s:iterator - situation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "s:iterator - situation" Watch "s:iterator - situation" New topic
Author

s:iterator - situation

Rohit Rai
Ranch Hand

Joined: Aug 04, 2008
Posts: 53
Hi,

I am using now the situation is the value xyz.aa will be diferrent at diferrent times i.e. it my be something like . So is there anyway to change the vaue that we pass to the iterator other than having a <s:if ...> construct ..

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You're basically asking for double-evaluation of OGNL, which doesn't happen. Can't you decide in the action?
Rohit Rai
Ranch Hand

Joined: Aug 04, 2008
Posts: 53
Hi David,

Thanks for the reply . Well actually the scenario is that i do not want double evaluation but the suffix after . should be dynamic. i.e. , at times it could be xx.yyy and some other time it could be xx.zzz

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

That's pretty much dynamic/double evaluation: what I'm suggesting is do that logic in the action, so the collection that's exposed is the correct one--that's the best place to do stuff like that.
Rohit Rai
Ranch Hand

Joined: Aug 04, 2008
Posts: 53
Okie ... Thnaks a lot for the help.
 
Don't get me started about those stupid light bulbs.
 
subject: s:iterator - situation
 
Similar Threads
Struts2 Iteator Tag with object in object
how to retrive session object / struts
how to use ONGL ?
<s:iterator
how to display mysql table datas in jsp using struts2