Handling Multiple Rows in Sturts
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rajeev_kumar
Posted On:   Tuesday, January 28, 2003 08:31 PM

Hi All, In Struts we all know for a view , we create and Form and Action Class, for example say there is view for Customer having the fields lastname and firstname so I will have CustomerForm Class having firstname and lastname as my member var and their getter setters method, there will be CustomerAction Class, this is all fine, but now if I am having the view in which there are repeated rows of the same type , I will modify the above mentioned example , let's say we have five rows of the customer information having the fields firstname and lastname (i.e in html/jsp page I have 5 rows with firstname and lastname comprising each row, even the html control name is same) Usually if we do request.getParameterValues("firstname") will return Strin   More>>

Hi All,

In Struts we all know for a view , we create and Form and Action Class, for example say there is view for Customer having the fields lastname and firstname so I will have CustomerForm Class having firstname and lastname as my member var and their getter setters method, there will be CustomerAction Class, this is all fine, but now if I am having the view in which there are repeated rows of the same type , I will modify the above mentioned example , let's say we have five rows of the customer information having the fields firstname and lastname (i.e in html/jsp page I have 5 rows with firstname and lastname comprising each row, even the html control name is same) Usually if we do request.getParameterValues("firstname") will return String Array of the values, how this is achieved in the struts.How is the Form Class composed in this case, do we use Array or some kind of Collection to represent the member var or something else to workaround this situation.Thanks In Advance


Cheers
Mittal Bhiogade

   <<Less

Re: Handling Multiple Rows in Sturts

Posted By:   rajeev_kumar  
Posted On:   Wednesday, January 29, 2003 10:10 PM

I am myself answering to this question, we need to create a class with multiple row elements as Collection of some kind such as Array, but now the Problem is if I ty to view the same data, addresses are getting disaplayed in multiple rows instaed of data
About | Sitemap | Contact