Class CartItemEditForm
java.lang.Object
org.apache.struts.action.ActionForm
com.softslate.commerce.customer.core.BaseForm
com.softslate.commerce.customer.order.CartAddForm
com.softslate.commerce.customer.order.CartItemEditForm
- All Implemented Interfaces:
Serializable
Struts form class for submissions to edit an item in the current user's cart.
Used for requests to "/CartItemEdit.do".
The validate
method of this class extends
CartAddForm.validate(ActionMapping, HttpServletRequest)
.
It checks the orderItemID
property to make sure it exists;
checks the quantity
property to make sure it's greater than
zero; and checks to make sure the user's session has not expired. In doing
this, it also populates the orderItem
property with the
OrderItem
instance being
edited.
- Author:
- David Tobey
- See Also:
-
Field Summary
Modifier and TypeFieldDescription(package private) static org.apache.commons.logging.Log
private OrderItem
private String
private static final long
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setOrderItem
(OrderItem orderItem) void
setOrderItemID
(String orderItemID) org.apache.struts.action.ActionErrors
validate
(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) Methods inherited from class com.softslate.commerce.customer.order.CartAddForm
getOrderAttributes, getOrderProductCodes, getOrderProductQuantities, getProductNames, getRequiredAttributeCodes, getRequiredAttributeNames, setOrderAttributes, setOrderProductCodes, setOrderProductQuantities, setProductNames, setRequiredAttributeCodes, setRequiredAttributeNames, validateAttributes, validateMaxItemsPerOrder, validateProductCode, validateQuantity
Methods inherited from class com.softslate.commerce.customer.core.BaseForm
formUtils, getBusinessObjectFactory, getErrors, getMapping, getMessage, getMessages, getRequest, getSettings, getUser, html5OrXhtml, initializeProperties, setBusinessObjectFactory, setErrors, setMapping, setMessages, setRequest, setSettings, setUser
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
log
static org.apache.commons.logging.Log log -
orderItemID
-
orderItem
-
-
Constructor Details
-
CartItemEditForm
public CartItemEditForm()
-
-
Method Details
-
getOrderItem
-
setOrderItem
-
getOrderItemID
-
setOrderItemID
-
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) - Overrides:
validate
in classCartAddForm
-