use of org.mifos.application.util.helpers.ActionForwards in project head by mifos.
the class MultipleLoanAccountsCreationAction method validate.
@TransactionDemarcate(joinToken = true)
public ActionForward validate(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ActionForwards actionForward = ActionForwards.load_success;
String method = (String) request.getAttribute("methodCalled");
if (method != null) {
if (method.equals(Methods.getPrdOfferings.toString()) || method.equals(Methods.load.toString()) || method.equals(Methods.get.toString())) {
actionForward = ActionForwards.load_success;
} else if (method.equals(Methods.create.toString())) {
actionForward = ActionForwards.get_success;
}
}
return mapping.findForward(actionForward.toString());
}
use of org.mifos.application.util.helpers.ActionForwards in project head by mifos.
the class GroupCustAction method hierarchyCheck.
@TransactionDemarcate(saveToken = true)
public ActionForward hierarchyCheck(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ActionForwards actionForward = null;
CenterHierarchySearchDto centerHierarchySearchDto = this.groupServiceFacade.isCenterHierarchyConfigured();
if (centerHierarchySearchDto.isCenterHierarchyExists()) {
SessionUtils.setAttribute(GroupConstants.CENTER_SEARCH_INPUT, centerHierarchySearchDto.getSearchInputs(), request.getSession());
actionForward = ActionForwards.loadCenterSearch;
} else {
actionForward = ActionForwards.loadCreateGroup;
}
SessionUtils.setAttribute(CustomerConstants.URL_MAP, null, request.getSession(false));
SessionUtils.setAttribute(GroupConstants.PREVIEW_CREATE_NEW_GROUP_FAILURE, false, request);
return mapping.findForward(actionForward.toString());
}
use of org.mifos.application.util.helpers.ActionForwards in project head by mifos.
the class LookupOptionsAction method validate.
@TransactionDemarcate(joinToken = true)
public ActionForward validate(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
logger.debug("Inside validate method");
ActionForwards actionForward = ActionForwards.addEditLookupOption_failure;
String method = (String) request.getAttribute("method");
if (method != null) {
if (method.equals(Methods.load.toString())) {
actionForward = ActionForwards.load_failure;
} else if (method.equals(Methods.update.toString())) {
String entity = request.getParameter(ConfigurationConstants.ENTITY);
setLookupType(entity, request);
actionForward = ActionForwards.update_failure;
}
}
logger.debug("outside validate method");
return mapping.findForward(actionForward.toString());
}
use of org.mifos.application.util.helpers.ActionForwards in project head by mifos.
the class CenterCustAction method cancel.
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward cancel(ActionMapping mapping, ActionForm form, @SuppressWarnings("unused") HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) {
CenterCustActionForm actionForm = (CenterCustActionForm) form;
ActionForwards forward = null;
if (actionForm.getInput().equals(Methods.create.toString())) {
forward = ActionForwards.cancel_success;
} else if (actionForm.getInput().equals(Methods.manage.toString())) {
forward = ActionForwards.editcancel_success;
}
return mapping.findForward(forward.toString());
}
use of org.mifos.application.util.helpers.ActionForwards in project head by mifos.
the class MeetingAction method update.
@TransactionDemarcate(validateAndResetToken = true)
@CloseSession
public ActionForward update(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
MeetingActionForm actionForm = (MeetingActionForm) form;
MeetingBO meeting = createMeeting(actionForm);
CustomerBO customerInSession = (CustomerBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
MeetingDto meetingDto = null;
if (meeting != null) {
meetingDto = meeting.toDto();
}
meetingServiceFacade.updateCustomerMeeting(meetingDto, customerInSession.getCustomerId());
ActionForwards forward = forwardForUpdate(actionForm.getCustomerLevelValue());
return mapping.findForward(forward.toString());
}
Aggregations