File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can Watch "Can New topic
Author

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.

prepare.java


display.jsp


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?

Thanks
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.
 
 
subject: Can't display an ArrayList using nested:iterate
 
Similar Threads
Displaying matrix type of questions in struts?
Linking checkbox to textfield in nested?
Struts Iterate tag, issue in populating form bean values
Struts - Using Nested Beans
Nested arrayLists displayed within nested selectBoxes