use of freemarker.ext.servlet.IncludePage in project head by mifos.
the class ClientsAndAccountsPageController method showClientsAndAccounts.
@RequestMapping(value = "/clientsAndAccounts", method = { RequestMethod.POST, RequestMethod.GET })
public ModelAndView showClientsAndAccounts(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("customerSearch") CustomerSearchFormBean customerSearchFormBean, @RequestParam(required = false) Short officeId, @RequestParam(required = false) Short loanOfficerId) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.addObject("include_page", new IncludePage(request, response));
boolean isCenterHierarchyExists = configurationServiceFacade.getBooleanConfig("ClientRules.CenterHierarchyExists");
modelAndView.addObject("isCenterHierarchyExists", isCenterHierarchyExists);
if (officeId == null && loanOfficerId == null) {
modelAndView = showClientsAndAccountsMainSearch(request, customerSearchFormBean, modelAndView);
} else {
if (loanOfficerId == null) {
modelAndView = showClientsAndAccountsBranchSearch(request, customerSearchFormBean, modelAndView, officeId);
} else {
modelAndView = showClientsAndAccountsBranchSearchLoanOfficer(request, customerSearchFormBean, modelAndView, officeId, loanOfficerId);
}
}
return modelAndView;
}
use of freemarker.ext.servlet.IncludePage in project head by mifos.
the class ViewCustomerDetailsController method showCenterDetails.
@RequestMapping(value = "/viewCenterDetails", method = RequestMethod.GET)
public ModelAndView showCenterDetails(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
sitePreferenceHelper.resolveSiteType(modelAndView, "viewCenterDetails", request);
modelAndView.addObject("include_page", new IncludePage(request, response));
String centerSystemId = request.getParameter("globalCustNum");
CenterInformationDto centerInformationDto = this.centerServiceFacade.getCenterInformationDto(centerSystemId);
modelAndView.addObject("centerInformationDto", centerInformationDto);
modelAndView.addObject("currentPageUrl", UrlHelper.constructCurrentPageUrl(request));
request.getSession().setAttribute("backPageUrl", request.getAttribute("currentPageUrl"));
centerServiceFacade.putCenterBusinessKeyInSession(centerSystemId, request);
return modelAndView;
}
use of freemarker.ext.servlet.IncludePage in project head by mifos.
the class ViewCustomerDetailsController method showGroupDetails.
@RequestMapping(value = "/viewGroupDetails", method = RequestMethod.GET)
public ModelAndView showGroupDetails(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
sitePreferenceHelper.resolveSiteType(modelAndView, "viewGroupDetails", request);
modelAndView.addObject("include_page", new IncludePage(request, response));
String groupSystemId = request.getParameter("globalCustNum");
GroupInformationDto groupInformationDto = this.groupServiceFacade.getGroupInformationDto(groupSystemId);
modelAndView.addObject("groupInformationDto", groupInformationDto);
boolean isGroupLoanAllowed = configurationServiceFacade.getBooleanConfig("ClientRules.GroupCanApplyLoans");
modelAndView.addObject("isGroupLoanAllowed", isGroupLoanAllowed);
boolean isCenterHierarchyExists = configurationServiceFacade.getBooleanConfig("ClientRules.CenterHierarchyExists");
modelAndView.addObject("isCenterHierarchyExists", isCenterHierarchyExists);
modelAndView.addObject("currentPageUrl", UrlHelper.constructCurrentPageUrl(request));
request.getSession().setAttribute("backPageUrl", request.getAttribute("currentPageUrl"));
groupServiceFacade.putGroupBusinessKeyInSession(groupSystemId, request);
return modelAndView;
}
use of freemarker.ext.servlet.IncludePage in project head by mifos.
the class ViewCustomerDetailsController method showClientDetails.
@RequestMapping(value = "/viewClientDetails", method = RequestMethod.GET)
public ModelAndView showClientDetails(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
sitePreferenceHelper.resolveSiteType(modelAndView, "viewClientDetails", request);
modelAndView.addObject("include_page", new IncludePage(request, response));
String clientSystemId = request.getParameter("globalCustNum");
ClientInformationDto clientInformationDto;
clientInformationDto = clientServiceFacade.getClientInformationDto(clientSystemId);
modelAndView.addObject("clientInformationDto", clientInformationDto);
boolean isPhotoFieldHidden = this.adminServiceFacade.isHiddenMandatoryField("photo");
modelAndView.addObject("isPhotoFieldHidden", isPhotoFieldHidden);
modelAndView.addObject("currentPageUrl", UrlHelper.constructCurrentPageUrl(request));
boolean containsQGForCloseClient = false;
containsQGForCloseClient = questionnaireServiceFacade.getQuestionGroupInstances(clientInformationDto.getClientDisplay().getCustomerId(), "Close", "Client").size() > 0;
modelAndView.addObject("containsQGForCloseClient", containsQGForCloseClient);
request.getSession().setAttribute("backPageUrl", request.getAttribute("currentPageUrl"));
clientServiceFacade.putClientBusinessKeyInSession(clientSystemId, request);
return modelAndView;
}
use of freemarker.ext.servlet.IncludePage in project head by mifos.
the class ViewLoanAccountDetailsController method showLoanAccountRepaymentSchedule.
@RequestMapping(value = "/viewLoanAccountRepaymentSchedule", method = RequestMethod.GET)
public ModelAndView showLoanAccountRepaymentSchedule(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
sitePreferenceHelper.resolveSiteType(modelAndView, "viewLoanAccountRepaymentSchedule", request);
modelAndView.addObject("include_page", new IncludePage(request, response));
String globalAccountNum = request.getParameter("globalAccountNum");
LoanInformationDto loanInformationDto = loanAccountServiceFacade.retrieveLoanInformation(globalAccountNum);
modelAndView.addObject("loanInformationDto", loanInformationDto);
modelAndView.addObject("currentDate", new Date());
OriginalScheduleInfoDto originalScheduleInfoDto = loanAccountServiceFacade.retrieveOriginalLoanSchedule(globalAccountNum);
modelAndView.addObject("isOriginalScheduleAvailable", originalScheduleInfoDto.hasOriginalInstallments());
this.loanAccountServiceFacade.putLoanBusinessKeyInSession(globalAccountNum, request);
return modelAndView;
}
Aggregations