I have a dynamic table with a list of entries. Every
row can be changed in one view and when the user
submits it, everything is updated at once.

How can I do this with struts? Rendering form elements
with struts requires a property, but since I use
multiple rows, all with the same property name (as a
prefix, the unique id (can be text also) of the row
forms the suffix), this cannot be done in a struts
form. How do I do it?

I currently used pure HTML for this and generated the
names of the fields by adding the unique key value of
the row. The rows names would look like this:

nameXXX   salaryXXX   addressXXX
nameYYY   salaryYYY   addressYYY

etc. My processing action now has to run through ALL
the parameters sent and figure it out with something
like:

  if (param.startsWith("name") {
      id = param.substring(4);
      salary = request.getParameter("salary" + id)
      // etc, until you have the complete record 
      // then update the record

Is there a better way do to this? And can it be done
with struts forms?



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to