public org.apache.struts.action.ActionForward | execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
CartActionForm cartForm = (CartActionForm) form;
AccountActionForm acctForm = (AccountActionForm) request.getSession().getAttribute("accountForm");
String page = request.getParameter("page");
if (acctForm != null && acctForm.getAccount() != null) {
if ("next".equals(page)) {
acctForm.getMyList().nextPage();
}
else if ("previous".equals(page)) {
acctForm.getMyList().previousPage();
}
}
if ("nextCart".equals(page)) {
cartForm.getCart().getCartItemList().nextPage();
}
else if ("previousCart".equals(page)) {
cartForm.getCart().getCartItemList().previousPage();
}
return mapping.findForward("success");
|