@ActionMethod( name = "edit", successView = "index.vhtml", errorView = "EditAccount.vhtml", parameterClass = EditAccountParameterObject.class, httpMethod = ActionMethod.HttpMethod.POST) public void doPostEdit(ActionContext actionContext) throws Exception { EditAccountParameterObject invocation = (EditAccountParameterObject) actionContext.getParameterObject(); SessionContext sessionContext = actionContext.getSessionContext(); Account account = (Account) sessionContext.getAttribute(ACCOUNT_SESSION_KEY); Account newAccount = new Account(); newAccount.setBannerName(account.getBannerName()); newAccount.setUsername(account.getUsername()); newAccount.setStatus(account.getStatus()); newAccount.setPassword(invocation.getPassword()); newAccount.setAddress1(invocation.getAddress1()); newAccount.setAddress2(invocation.getAddress2()); newAccount.setBannerOption(invocation.getBannerOption()); newAccount.setCity(invocation.getCity()); newAccount.setCountry(invocation.getCountry()); newAccount.setEmail(invocation.getEmail()); newAccount.setFavouriteCategoryId(invocation.getFavouriteCategoryId()); newAccount.setFirstName(invocation.getFirstName()); newAccount.setLanguagePreference(invocation.getLanguagePreference()); newAccount.setLastName(invocation.getLastName()); newAccount.setListOption(invocation.getListOption()); newAccount.setPassword(invocation.getPassword()); newAccount.setPhone(invocation.getPhone()); newAccount.setState(invocation.getState()); newAccount.setZip(invocation.getZip()); try { accountBO.updateAccount(newAccount); sessionContext.setAttribute(ACCOUNT_SESSION_KEY, newAccount); } catch (Exception e) { // update failed throw e; } }