I am having difficulties with ActionForm when dealing with indexed properties.
I have a form that has varying number of product fields - it is a shopping chart that consist of products with four parameters: id, name, price and quantity.
For that I have created JavaBean "Item":
So the form consist of indexed properties like that:
So the data is sent like so:
item[0].id=""; item[0].name=""; item[0].price=""; item[0].quantity="";
item[1].id=""; item[1].name=""; item[1].price=""; item[1].quantity="";
....
Now what confuses me, is how to create a ActionForm. After reading punch of other posts and articles about it, this is what I have comed up with:
It feels that this is not it - it seems too simple

And allso I have no idea how to make a validate method, for chacking the quantity parameter, that is set in input, type=text.
Anyway I think there is no reason, but to be sure, I allso post the part of Action class where I try to get access to the ArrayList of Items:
So after I submit the form I get exception HTTP Status 500 - :
And this is where I am out of ideas. Please help.
[ May 16, 2006: Message edited by: Juhan Voolaid ]