• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2: Iterator/Valuestack question.

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

So, I have a jsp with an iterator. The iterator iterates through a List of ReservationBeans.
Each bean contains a couple of values, the date of the reservation is one of them.

My problem:

The list contains several ReservationBeans, some of the beans have the same date value.
Ex. There are two ReservationsBeans where the value of date is "2009-03-03".

If the iterator has already iterated a ReservationBean with the same date as the current ReservationBean I want it to ignore further instructions. This would be done with an <s:if> tag.

Ex.


So my question is, is there a way of collecting the date value of the previous ReservationBean from the value stack?
Or do you have any other clever ideas on how this could be achieved?

Thanks,
Alia
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Save it with <s:set...>?
 
It's never done THAT before. Explain it to me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic