This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

s:iterator - situation

 
Rohit Rai
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're basically asking for double-evaluation of OGNL, which doesn't happen. Can't you decide in the action?
 
Rohit Rai
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okie ... Thnaks a lot for the help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic