com.konakart.forms
Class EditCartForm
java.lang.Object
org.apache.struts.action.ActionForm
org.apache.struts.validator.ValidatorForm
com.konakart.forms.BaseForm
com.konakart.forms.EditCartForm
- All Implemented Interfaces:
- java.io.Serializable
public class EditCartForm
- extends BaseForm
This form contains all of the information required in order to edit a list of cart items. The
item may be removed or the quantity may be changed.
- See Also:
- Serialized Form
| Fields inherited from class org.apache.struts.validator.ValidatorForm |
page, validatorResults |
| Fields inherited from class org.apache.struts.action.ActionForm |
multipartRequestHandler, servlet |
|
Method Summary |
java.lang.String |
getCouponCode()
|
java.lang.String |
getGoToCheckout()
|
java.util.ArrayList |
getItemList()
|
void |
reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Method reset Dynamically creates the appropriate itemList based on the request. |
void |
setCouponCode(java.lang.String couponCode)
|
void |
setGoToCheckout(java.lang.String goToCheckout)
|
void |
setItemList(java.util.ArrayList itemList)
|
| Methods inherited from class org.apache.struts.validator.ValidatorForm |
getPage, getResultValueMap, getValidationKey, getValidatorResults, setPage, setValidatorResults, validate |
| Methods inherited from class org.apache.struts.action.ActionForm |
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EditCartForm
public EditCartForm()
- Constructor
getItemList
public java.util.ArrayList getItemList()
- Returns:
- List of items
setItemList
public void setItemList(java.util.ArrayList itemList)
- Parameters:
itemList -
getGoToCheckout
public java.lang.String getGoToCheckout()
- Returns:
- Returns the goToCheckout.
setGoToCheckout
public void setGoToCheckout(java.lang.String goToCheckout)
- Parameters:
goToCheckout - The goToCheckout to set.
reset
public void reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Method reset Dynamically creates the appropriate itemList based on the request. When the user
deletes something from the cart and then clicks the back button, he sees the items in the
cart again but the list in the form isn't long enough so if he clicks update again, we get a
Struts array index out of bounds error when the bean copier tries to index a list element
that doesn't exist. From the request parameters we figure out the largest index and add items
to the array if they are needed.
- Overrides:
reset in class BaseForm
- Parameters:
mapping - The Struts Action mappingrequest - The incoming request
getCouponCode
public java.lang.String getCouponCode()
- Returns:
- Returns the couponCode.
setCouponCode
public void setCouponCode(java.lang.String couponCode)
- Parameters:
couponCode - The couponCode to set.
Copyright © 2006 DS Data Systems UK Ltd.