How can i use ArrayList in ActionForm
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sambasivarao_damerla
Posted On:   Saturday, April 24, 2004 03:08 AM

Hi all, Is it prossible ArrayList in ActionFrom like String, int etc.. If can, someone plz give a sample jsp page for this my conscept is as follows 1) I have an ArryaList contains UserBean objects. Each UserBean contains three String varibles like name, location and PhoneNo. 2) My ActionFrom lets say UserBeansFrom conatains the Variable ArrayList userBeansList; 3) There was a ActionClass called GetUserBeansAction which job is retrive all the user and sore in the bean objes and each bean object was added to a local ArrayList variable lets say "userList". 4) After this, GetUserBeansAct   More>>

Hi all,

Is it prossible ArrayList in ActionFrom like String, int etc..


If can, someone plz give a sample jsp page for this
my conscept is as follows



1) I have an ArryaList contains UserBean objects. Each
UserBean contains three String varibles like name,
location and PhoneNo.



2) My ActionFrom lets say UserBeansFrom conatains the
Variable ArrayList userBeansList;


3) There was a ActionClass called GetUserBeansAction which
job is retrive all the user and sore in the bean objes
and each bean object was added to a local ArrayList
variable lets say "userList".



4) After this, GetUserBeansAction class will create an
object of UserBeansFrom and assing the local ArrayList
object "userList" to the UserBeansFrom's ArrayList.



5) Once it Succesfully set all these things its action
forwads, then it has to use the UserBeansFrom whos
ArrayList was already setted has to how the things in the JSP file



Can any one plz answer me.



Thanks in advance,

sambadamerla

   <<Less

Re: How can i use ArrayList in ActionForm

Posted By:   Rashmi_Madhav  
Posted On:   Saturday, April 24, 2004 04:57 AM

It is not clear if you want to input the user details from the JSP or just want to display.



In case you want to display the properties of the UserBeanList then you could do something like this:
In the ActionForm:


ArrayList userBeanList;
public ArrayList getUserBeanList(){...}

In the JSP:




  
  
  




Hope this helps.

Regards,

Rashmi
About | Sitemap | Contact