File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Languages and the fly likes Populating an ArrayList through JSON Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Populating an ArrayList through JSON" Watch "Populating an ArrayList through JSON" New topic

Populating an ArrayList through JSON

Acro Acromantula

Joined: Sep 10, 2009
Posts: 2

Hi all

I have an ArrayList object in my Structs2 action class. I want to populate it when i send a request. In the action class i hv this

which holds the SaveNewIRDTO object which has 3 attributes with the proper getters and setters. In the Javascript file i'm sending a request using JQuery JSON support. I'm passing the object through the URL and assigning the values for the attributes in the following way

:where "selectedIlRows" is initialized correctly

My issue is there are three instance of the SaveNewIRDTO object created (When the loop is iterated only once) within the ArrayList

I think i'm doing something really dumb here...can some one please help me out??
Acro Acromantula

Joined: Sep 10, 2009
Posts: 2 stupid of me

Don't get me started about those stupid light bulbs.
subject: Populating an ArrayList through JSON
Similar Threads
problem setting form Action name Dynamically on button click
Session values still exist after using response.sendRedirect()
Calling another web-app using RequestDispatcher
Reading a 'Collection' object from JSON
Adding new elements to ActionForm collection