KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > example > ajax > actions > UpdateQuantityInCart


1 /*
2  * Copyright (c) 2005 Your Corporation. All Rights Reserved.
3  */

4 package com.opensymphony.webwork.example.ajax.actions;
5
6 import com.opensymphony.webwork.example.ajax.cart.ShoppingCart;
7
8 /**
9  * UpdateQuantityInCart
10  *
11  * @author Jason Carreira <jcarreira@eplus.com>
12  */

13 public class UpdateQuantityInCart extends AbstractModifyCartAction {
14     public String JavaDoc execute() throws Exception JavaDoc {
15         ShoppingCart cart = getCart();
16         if (cart != null) {
17             cart.setQuantity(quantity, product);
18         }
19         return SUCCESS;
20     }
21 }
22
Popular Tags