File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Do I Update An ArrayList in an ActionForm?

 
amchi gelo
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have an ActionForm bean that contains an ArrayList of records that I display in a JSP file using the <logic:iterate> tag. My problem is these records are updateable fields, so how do I code it so that it catches the changes? As of now, the setter for the ArrayList is not called at all, so there is no update and it remains stuck at the previous values. I have a workaround where I get the values from the request in the Action class and update the ArrayList there. How do I do it in a more Struts way?

Sanjay
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use the <logic:iterate> tag in combination with <html:text> or other input tags. The link below shows how to do this.

http://struts.apache.org/faqs/indexedprops.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic