struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: How to handle a table with an unknown number of rows
Date Fri, 18 Jun 2004 11:41:15 GMT
The form could have many thousands of rows and my real problem was 
determining which cell had been edited.  I'm not sure if it's correct, but 
I solved this by doing the following:

1. Each editable textfield in the HTML form has a dynamically constructed 
name.  This field also has an "onChange" handler that dynamically adds a 
new new hidden element (dirtyCell) to the page to track the changed 
2. The textfields and hidden elements are passed to the action.
3. I iterate over the array of "dirtyCell", get the textfield name that 
has been edited, and retrieve the contents from request parameter map and 
then persist it.

If anyone knows of a better way to do it, I'd love to hear it.


Ravi <> 
06/18/2004 06:20 AM
Please respond to
"Struts Users Mailing List" <>

Struts Users Mailing List <>

RE: How to handle a table with an unknown number of rows

U can try this.Most probably this will work.
U can store the data in the Arraylist map this list to form level 
use logic:iterate tag to display data from the form Level ArrayList with 
id and property as the form level list.
tell me whether @ runtime r u going to add any rows??
Correct me if i am wrong.
G Ravi.
"Rajat Pandit, Gurgaon" <> wrote:
Not sure about the version issue, but you might want to look at indexed
properties. Search for "miniHOW" in the archives and you might find one of
the posts which deals with this.

-----Original Message-----
Sent: Thursday, June 17, 2004 10:26 PM
To: Struts Users Mailing List
Subject: How to handle a table with an unknown number of rows

So, I can't get my head around this. Is it possible for an ActionForm to
model an HTML table with an unknown number of rows? 

The context is that I have a page that displays the raw results of a 
One of the fields is always editable by the user, so I need to be able to
submit a form to persist the edited data. However, I don't know the size 
the resultset in advance, so I'm...stuck. 

BTW, I'm currently constrained to using Struts 1.0. 


Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.

View raw message