FileDocCategorySizeDatePackage
UpdateCartAction.javaAPI DocJBoss 4.2.11466Fri Jul 13 20:56:04 BST 2007xpetstore.web.struts.action.cart

UpdateCartAction

public class UpdateCartAction extends xpetstore.web.struts.action.BaseAction
author
Herve Tchepannou
struts.action
name="cartForm" path="/updateCart" scope="request" validate="false"
struts.action-forward
name="success" path="/cart.jspa"

Fields Summary
Constructors Summary
Methods Summary
protected org.apache.struts.action.ActionForwarddoExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

see
xpetstore.web.struts.action.BaseAction#doExecute(ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse)

        CartForm  frm = ( CartForm ) form;

        Cart cart = getCart( request );

        /* Cart items */
        cart.updateItems( frm.getItemId(  ), frm.getQuantity(  ) );

        return mapping.findForward( SUCCESS );