How to pass arrayList of object from jsp to Action class

Discussions

Web tier: servlets, JSP, Web frameworks: How to pass arrayList of object from jsp to Action class

  1. Initially I am setting a list in controller. In jsp, using I am displaying the multiples records of a list. I am editing those multiple records and finally submitting to controller ( Servlet). In servlet(controller), How I can get that list. using struts......
  2. u have the list values set as readonly. also u have to use the struts nested tag to remember which items in the collection has been set.
  3. u have the list values set as readonly.
    well, i think the idea is to make input text fields editable when the user ticks the corresponding checkbox. what concerns values gathering there are two options: 1. if you just need a bunch of strings enetered without any particular indexing mechanism you use the same property name for all of the input type fields and make the setter for this property in your ActionForm to accept array of Strings like setMyProperty(String[] values). 2. if you need to know the indexes of the strings enetered as well then your way is to use indexed properties like ActionForm.setMyProperty(int index, String value)
  4. Thank you guys for giving reply. But in my case, I need arrayList of Ojects guys, not arrayList of string. could you please resolve the same .....
  5. Hmmm, I think String has always been an Object (try {Object iNeedIt = stringArray[i];}). On a serious side, what kind of Object do you need? I guess the only thing you could get from http request is string (or file in the worst case). However, are you aware of DWR library? It might be what you really need in here. But for it to work for you, you have to know aJax (JavaScript part of it in particular).
  6. Figure it out or flip burgers.
  7. LOL, I second that :).
  8. manners are a privilege of few[ Go to top ]

    Hey Jeryl, looks like You second to be a buttkisser for an *******. If there is nothing relevant to say, then just enjoy the silence. There are a lot of mentally challenged people out there who have difficulties perceiving the social context of a situation. Don't be one of them.
  9. Well said[ Go to top ]

    Well said, Brandon.