wood burning stoves 2.0*
The moose likes Struts and the fly likes Can't display an ArrayList using nested:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can Watch "Can New topic

Can't display an ArrayList using nested:iterate

Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
Howdy all.

I've got a strange problem.

On one of my .jsp's I have to display the details (records) of a bean. Simple enough.

The problem is that it won't display. I have no explanation.



Now, the strange thing is that the property rows is empty for some reason (verified with a small scriptlet), even though all the other data that I assign to "myForm" shows up on the page and, right before I return the mapping.findForward, I double check to make sure that there is something inside rows (there is).

I have no explanation for this. Of the several dozen pages I've got (many of which I do very similar things) this is the only one doing this.

Are there are known bugs with nested or ArrayLists in Struts that I'm not aware of, or any other reason why it might be acting like this?

Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
Well, I psuedo-solved the problem.

It seems that I can't pass any ArrayLists or Lists to the form for some reason with that one particular page (Always empties... have no idea why).

Instead I just threw the list into the request and retrieved it on the jsp.

Not very clean, but it did work.
I agree. Here's the link: http://aspose.com/file-tools
subject: Can't display an ArrayList using nested:iterate
Similar Threads
Displaying matrix type of questions in struts?
Nested arrayLists displayed within nested selectBoxes
Linking checkbox to textfield in nested?
Struts Iterate tag, issue in populating form bean values
Struts - Using Nested Beans