use of org.mifos.customers.checklist.struts.actionforms.ChkListActionForm in project head by mifos.
the class ChkListAction method getEditStates.
@TransactionDemarcate(joinToken = true)
public ActionForward getEditStates(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
List<String> details = chkListActionForm.getValidCheckListDetails();
List<CheckListStatesView> states = retrieveStates(chkListActionForm.getIsCustomer(), chkListActionForm.getMasterTypeId());
SessionUtils.setCollectionAttribute(CheckListConstants.STATES, states, request);
SessionUtils.setCollectionAttribute(CheckListConstants.DETAILS, details, request);
return mapping.findForward(ActionForwards.manage_success.toString());
}
use of org.mifos.customers.checklist.struts.actionforms.ChkListActionForm in project head by mifos.
the class ChkListAction method get.
@TransactionDemarcate(saveToken = true)
public ActionForward get(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
Short localeId = getUserContext(request).getLocaleId();
Short checklistId = getShortValue(chkListActionForm.getCheckListId());
CheckListBO checkList = new CheckListPersistence().getCheckList(checklistId);
if (checkList.getCheckListType().equals(CheckListType.CUSTOMER_CHECKLIST)) {
CustomerCheckListBO customerCheckList = (CustomerCheckListBO) checkList;
SessionUtils.setAttribute(Constants.BUSINESS_KEY, customerCheckList, request);
SessionUtils.setAttribute(CheckListConstants.TYPE, CheckListType.CUSTOMER_CHECKLIST.getValue(), request);
} else {
AccountCheckListBO accountCheckList = (AccountCheckListBO) checkList;
SessionUtils.setAttribute(Constants.BUSINESS_KEY, accountCheckList, request);
SessionUtils.setAttribute(CheckListConstants.TYPE, CheckListType.ACCOUNT_CHECKLIST.getValue(), request);
}
SessionUtils.setAttribute(CheckListConstants.CREATED_BY_NAME, new PersonnelBusinessService().getPersonnel(checkList.getCreatedBy()).getDisplayName(), request);
return mapping.findForward(ActionForwards.get_success.toString());
}
use of org.mifos.customers.checklist.struts.actionforms.ChkListActionForm in project head by mifos.
the class ChkListAction method getStates.
@TransactionDemarcate(joinToken = true)
public ActionForward getStates(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
List<String> details = chkListActionForm.getValidCheckListDetails();
List<CheckListStatesView> states = retrieveStates(chkListActionForm.getIsCustomer(), chkListActionForm.getMasterTypeId());
deleteExistingStates(states, chkListActionForm.getIsCustomer(), chkListActionForm.getMasterTypeId(), (short) -1);
SessionUtils.setCollectionAttribute(CheckListConstants.STATES, states, request);
SessionUtils.setCollectionAttribute(CheckListConstants.DETAILS, details, request);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.customers.checklist.struts.actionforms.ChkListActionForm in project head by mifos.
the class ChkListAction method previous.
@TransactionDemarcate(joinToken = true)
public ActionForward previous(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ChkListActionForm chkListActionForm = (ChkListActionForm) form;
List<String> details = chkListActionForm.getValidCheckListDetails();
SessionUtils.setCollectionAttribute(CheckListConstants.DETAILS, details, request.getSession());
return mapping.findForward(ActionForwards.previous_success.toString());
}
Aggregations