wood burning stoves 2.0*
The moose likes Struts and the fly likes logic:iterate - not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:iterate - not working" Watch "logic:iterate - not working" New topic
Author

logic:iterate - not working

Johann Evans
Ranch Hand

Joined: Nov 18, 2002
Posts: 47
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?
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Would you mind posting your code?


Matthew Phillips
Johann Evans
Ranch Hand

Joined: Nov 18, 2002
Posts: 47
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logic:iterate - not working
 
Similar Threads
Retrieving indexed property of form-bean
How to use logic:iterate tag
html:hidden within logic:iterate
about logic:iterate and bean:write tag
logic:iterate