FileDocCategorySizeDatePackage
EditAccountFormAction.javaAPI DocExample1223Thu Dec 04 08:19:26 GMT 2003org.springframework.samples.jpetstore.web.struts

EditAccountFormAction

public class EditAccountFormAction extends SecureBaseAction

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)

    AccountActionForm workingAcctForm = (AccountActionForm) form;
    AccountActionForm acctForm = (AccountActionForm) request.getSession().getAttribute("accountForm");
    String username = acctForm.getAccount().getUsername();
    if (workingAcctForm.getAccount() == null) {
      Account account = getPetStore().getAccount(username);
      workingAcctForm.setAccount(account);
    }
    if (workingAcctForm.getCategories() == null) {
      List categories = getPetStore().getCategoryList();
      workingAcctForm.setCategories(categories);
    }
    return mapping.findForward("success");