@Override protected ActionForward executeAction(final MobileActionContext context) throws Exception { final HttpServletRequest request = context.getRequest(); final HttpSession session = request.getSession(); if (RequestHelper.isGet(request)) { if (RequestHelper.isFromMenu(request)) { session.removeAttribute("mobileDoPaymentDTO"); } // Form display: store the bookmark so, on errors, we will return to here storeBookmark(context); return context.getInputForward(); } else { try { // Build the payment DTO final Member fromMember = context.getMember(); final Member toMember = validateTo(context); final DoPaymentDTO payment = new DoPaymentDTO(); payment.setChannel(context.getChannel()); payment.setContext(TransactionContext.PAYMENT); payment.setFrom(fromMember); payment.setTo(toMember); payment.setAmount(validateAmount(context)); payment.setDescription(validateDescription(context)); payment.setTransferType(validateTransferType(context, toMember)); // Check if the payment can be performed validatePayment(payment); // Store the DTO, so, the confirmation action will access it session.setAttribute("mobileDoPaymentDTO", payment); } catch (final MobileException e) { return MobileHelper.sendException(context.getActionMapping(), request, e); } return context.getSuccessForward(); } }