KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xpetstore > web > webwork > action > cart > RemoveItemAction


1 /*
2  * Created on 24-Feb-2003
3  */

4 package xpetstore.web.webwork.action.cart;
5
6
7 /**
8  * @author <a HREF="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
9  *
10  * @webwork.action
11  * name="removeItem"
12  * success="cart.action"
13  */

14 public class RemoveItemAction
15     extends BaseCartAction
16 {
17     //~ Instance fields --------------------------------------------------------
18

19     private String JavaDoc _itemId;
20
21     //~ Methods ----------------------------------------------------------------
22

23     /**
24      * @see webwork.action.ActionSupport#doExecute()
25      */

26     protected String JavaDoc doExecute( )
27         throws Exception JavaDoc
28     {
29         getCart( ).remove( _itemId );
30
31         return SUCCESS;
32     }
33
34     /**
35      * @return String
36      */

37     public String JavaDoc getItemId( )
38     {
39         return _itemId;
40     }
41
42     /**
43      * Sets the itemId.
44      * @param itemId The itemId to set
45      */

46     public void setItemId( String JavaDoc itemId )
47     {
48         _itemId = itemId;
49     }
50 }
51
Popular Tags