• 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

logic:iterate - not working

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just cant seem to get the logic:iterate tag to work!
Keep telling me it cannot find the bean xxx in scope null. This of course being the bean from which I write within the iteration and which is the id attribute of the iterate tag.
Is there anymore samples somewhere?
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would you mind posting your code?
 
Johann Evans
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used an enumeration for the property value that is returned as an array and this did not work, so I changed it to a Hashtable and it seem to work now - here is my old code:
This is the iteration:

The Client class had a
public Title[] getTitles() {
}
and inside it I used like the sample code from the example to change it to an array, except, the titles property in client is of TitleSet, my own class implementing Enumeration. Therefore a first copied the enumeration to a Vector and then used the example code to take it back to an enumeration. The reason: I dont know how to get the size of an Enumeration??? But it all compiled inevitably. And that's where I got the problem...
Well, I think it might be my own fault afterall - would just like to see a bit more elaborate documentation on Struts - sometimes difficult for a newbie to get everything done!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic