struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
Subject Re: Multiple row selection
Date Fri, 18 Jul 2003 15:21:41 GMT


Goldy J wrote:
> Hello, 
> I am facing a peculiar problem . I have a Action Class1 which  gets RS from DB. I set
the elements of FormBean1 and add them into a ArrayList1. So at the end of my Action Class1
i have a Array List 1 which has objects of my formbean1.
>  
> I call this ArrayList1 in my JSP1 and using Iterate tag , is able to get the formbean
object and is able to show it as a row of a table. So effectively one row of my table is an
Object of Formbean1(is it ??).
> Now i has this requirement of selecting any number of rows of the populated table in
JSP1 and taking them to JSP2. 
> I have tried checkboxes, multiboxes but couldn't get thru it . I think the problem is
when I submit JSP1 it is submitted as one formbean object , whereas in my case each row is
a different object. So need some mechanism so that when somebody checks it is set in the Arraylist
1 itself and i can get the value in action class or may be some other scheme which make life
easier!!!

I find it helpful to use the primary key of the database row as a form 
input.  So when a user selects FB1, FB3, and FB6, the primary keys of 
each of those FormBeans gets sent back to the server.  On the second 
JSP, you can then fetch these FormBeans from the DB in a new database 
query (or from a cache if you are caching them within the application).


Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message