I wrote a very similar module last summer and still have the source.  It may
help, if you want it.

Mark

-----Original Message-----
From: Greg Blomqusit [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2003 12:20 PM
To: [EMAIL PROTECTED]
Subject: Order Detail page with editable line items


I have a problem that I'm sure is quite common.  However, I have not seen
any decent examples of how this might be implemented using Struts, so any
suggestions would be greatly appreciated.

The problem is this:  I have an order detail page that has a list of line
items with editable data inside each line item.  The user is allowed to
select which product they're ordering and what quantity of that product per
line item.

I can figure out how to create an ActionForm bean that is able to convey the
values to the JSP using a collection of line item beans inside the
ActionForm.  And, I can figure out how to code the JSP to output the values
into the form elements using the <logic:iterate> tag.

However, what I'm having trouble with is submitting the values back to the
Action.  How can Struts repopulate the collection inside the ActionForm?
Or, if I should not be using a collection to represent the line items, how
else should I do it?  In the case of not using a collection to represent the
line items, how do I get Struts taglib to populate the form elements in the
JSP?

I've attached a gif file that depicts the prototype of the screen I'm
talking about, for those of you who are visual thinkers.

Any help is appreciated!

Thanks!

-----------------
 Greg Blomquist





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

Reply via email to