Need help with shopping cart
I have a dropdownbox where people can first select a catagory.
According to the category chosen, a datatable gets filled out with a CachedRowSet containing the items in that category.
Each row has an inputtext and a submit button
People can fill in the quantity they want to order.
My question is how/where can I save those quantities
I also want those quantities redisplayed in the inpuxboxes even when users switch to another category and return back..
Redisplaying doesn't seem to be a problem as long as I don't change category (which is obvious since the datasource of the datatable changes)
Does anyone has an idea on how to save those values and redisplay them
# 2
Sorry, i'm kinda new to JSF
Can you elaborate a bit?
If I change the CachedRowSet to a List of DTO's I still don't know how I can get those values out again to redisplay them.
Where can I save that list of DTO's then? If I select a new category a new list will be made, how can I get the values of the old category ? :s
# 3
Apparently I misunderstood you.
Well, there are serveral solutions. Put the backing bean containing the data in the session scope, or pass the values to be reused for the next request through h:inputHidden, or pass the values to be reused for the next request through requestMap, or store the values in the sessionMap, etcetera. Also see http://balusc.xs4all.nl/srv/dev-jep-com.html for a summary about this all.