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

AddItemAction

public class AddItemAction extends xpetstore.web.struts.action.BaseAction
author
Herve Tchepannou
struts.action
name="itemForm" path="/addItem" 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)

        ItemForm frm = ( ItemForm ) form;
        String   itemId = frm.getItemId(  );

        getCart( request ).addItem( itemId );

        return mapping.findForward( SUCCESS );