Sorry, I didn't explain myself.

Basically the page that shows the cart contents will have an unknown number
(Cardinality 0..*) of items listed. Beside each item there will be a text
box where the user can input the quantity of the item that they want to
order. When the user hits checkout or updateQuantity I have to be able to
figure out what item they are updating.

So, How do I know which item they are trying to update once I get to the
CartAction that does the processing of the form?

Thanks for the reply.

-Gp

-----Original Message-----
From: Erik Price [mailto:[EMAIL PROTECTED] 
Sent: June 13, 2003 2:58 PM
To: Struts Users Mailing List
Subject: Re: Easy way to deal with Dynamic Form elements



Giampiero De Ciantis wrote:
> I have basically a shopping cart application and I am wondering what is
the
> easiest way of updating the quantity of each item in the shopping cart.
> Populating the page with the list of cart items is easy. I have no clue
how
> I will process the Dynamic form elements that represent the quantity of
each
> item in the cart.

Presumably whatever class represents a CartItem has, in addition to a 
property pointing to an selection from your wares, a property to 
represent the quantity?  Then you simply need to update this quantity in 
the Action when a user specifies a quantity?

Or am I just not understanding you.


Erik



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


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

Reply via email to