• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

iterate tag compare

 
Janhvi Malhotra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
While iterating thru a logic tag, I need to compare the current object's property with the next object's property and then display.
Is it possible?
Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is more complicated than it might seem. You have to allow for the case where you're at the end of the list and there is no next object. I can't think of a way to make this work with <logic:xxx> tags. Even if you figured out a way, you'd end up having to use some scriptlets anyway.

If I were you, I'd just write a scriptlet to handle this. Another possibility would be to write your own custom tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic