Discussions
Web tier: servlets, JSP, Web frameworks: How to pass arrayList of object from jsp to Action class
-
How to pass arrayList of object from jsp to Action class (8 messages)
- Posted by: jilani baji
- Posted on: March 28 2007 12:52 EDT
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......Threaded Messages (8)
- Re: How to pass arrayList of object from jsp to Action class by Jeryl Cook on March 28 2007 16:06 EDT
- Re: How to pass arrayList of object from jsp to Action class by Mike S on March 29 2007 05:18 EDT
- Re: How to pass arrayList of object from jsp to Action class by jilani baji on March 30 2007 07:35 EDT
- Re: How to pass arrayList of object from jsp to Action class by Mike Spiridonov on March 30 2007 10:23 EDT
- Re: How to pass arrayList of object from jsp to Action class by Race Condition on March 30 2007 15:45 EDT
- RE: Figure it out or flip burgers. by Jeryl Cook on April 09 2007 12:33 EDT
-
manners are a privilege of few by Brandon Nyles on February 21 2008 01:29 EST
- Well said by Graham Jones on December 08 2009 05:41 EST
-
manners are a privilege of few by Brandon Nyles on February 21 2008 01:29 EST
- RE: Figure it out or flip burgers. by Jeryl Cook on April 09 2007 12:33 EDT
-
Re: How to pass arrayList of object from jsp to Action class[ Go to top ]
- Posted by: Jeryl Cook
- Posted on: March 28 2007 16:06 EDT
- in response to jilani baji
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. -
Re: How to pass arrayList of object from jsp to Action class[ Go to top ]
- Posted by: Mike S
- Posted on: March 29 2007 05:18 EDT
- in response to Jeryl Cook
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) -
Re: How to pass arrayList of object from jsp to Action class[ Go to top ]
- Posted by: jilani baji
- Posted on: March 30 2007 07:35 EDT
- in response to jilani baji
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 ..... -
Re: How to pass arrayList of object from jsp to Action class[ Go to top ]
- Posted by: Mike Spiridonov
- Posted on: March 30 2007 10:23 EDT
- in response to jilani baji
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). -
Re: How to pass arrayList of object from jsp to Action class[ Go to top ]
- Posted by: Race Condition
- Posted on: March 30 2007 15:45 EDT
- in response to jilani baji
Figure it out or flip burgers. -
RE: Figure it out or flip burgers.[ Go to top ]
- Posted by: Jeryl Cook
- Posted on: April 09 2007 12:33 EDT
- in response to Race Condition
LOL, I second that :). -
manners are a privilege of few[ Go to top ]
- Posted by: Brandon Nyles
- Posted on: February 21 2008 13:29 EST
- in response to Jeryl Cook
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. -
Well said[ Go to top ]
- Posted by: Graham Jones
- Posted on: December 08 2009 05:41 EST
- in response to Brandon Nyles
Well said, Brandon.