This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Problem with a shopping cart application using Stripes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "Problem with a shopping cart application using Stripes" Watch "Problem with a shopping cart application using Stripes" New topic
Author

Problem with a shopping cart application using Stripes

Alain Altet
Greenhorn

Joined: Jul 08, 2009
Posts: 1
I'm trying to implement a simple shopping cart for an e-commerce site I'm building for my wife using Stripes (great framework, by the way), and everything is working fine so far, except for one thing: I can't update the quantity of a particular item once it's been added to the shopping cart.

I can hit the "Add to cart" link again and it will update the quantity, but I also want to be able to type in the exact quantity directly in the quantity field.

This is my shopping cart Action Bean:



and this is my shopping cart JSP:



The form is populated by iterating thru the items in the cart. I have no problem removing a single item from the cart, but I have no idea how to reference a particular item in the cart (which I suppose is mandatory in order to be able to update said item). Anyone know how to achieve that?

By the way, I'm using a ShoppingCart class that implements a singleton pattern, so the shopping cart can be accessed from any action bean. I added this class as an extension to Stripes.

Thanks in advance!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem with a shopping cart application using Stripes
 
Similar Threads
Indexed Properties Example
need help from top Struts experts
Update Database with the newly entered value
Storing of Data
Problem with c:forEach Tag