use of org.springframework.web.servlet.ModelAndView in project head by mifos.
the class UncaughtExceptionHandler method checkForPageJndiException.
private ModelAndView checkForPageJndiException(Exception ex, HttpServletRequest request) {
if (ex instanceof JNDIException) {
ModelAndView modelAndView = null;
String viewName = determineViewName(ex, request);
if (viewName != null) {
modelAndView = getModelAndView(viewName, ex, request);
}
return modelAndView;
}
return null;
}
use of org.springframework.web.servlet.ModelAndView in project head by mifos.
the class ApprovalController method list.
@RequestMapping("restApprovalList.ftl")
public ModelAndView list() {
ModelAndView mav = new ModelAndView("approval/list");
List<BreadCrumbsLinks> breadcrumbs = new AdminBreadcrumbBuilder().withLink("View REST Approval List", "").build();
mav.addObject("isApprovalRequired", RESTConfigKey.isApprovalRequired(configurationServiceFacade));
mav.addObject("breadcrumbs", breadcrumbs);
mav.addObject("waitingForApprovalList", approvalService.getAllWaiting());
mav.addObject("approvedList", approvalService.getAllNotWaiting());
return mav;
}
use of org.springframework.web.servlet.ModelAndView in project head by mifos.
the class ApprovalController method details.
@RequestMapping("restApproval/id-{id}/details.ftl")
public ModelAndView details(@PathVariable Long id) {
ModelAndView mav = new ModelAndView("approval/details");
mav.addObject("waitingForApprovalList", approvalService.getAllWaiting());
RESTApprovalEntity approval = approvalService.getDetails(id);
mav.addObject("approval", approval);
PersonnelInformationDto p = personnelServiceFacade.getPersonnelInformationDto(approval.getCreatedBy().longValue(), null);
mav.addObject("createdBy", p.getDisplayName());
if (!approval.getState().equals(ApprovalState.WAITING)) {
p = personnelServiceFacade.getPersonnelInformationDto(approval.getApprovedBy().longValue(), null);
mav.addObject("approvedBy", p.getDisplayName());
}
return mav;
}
use of org.springframework.web.servlet.ModelAndView in project head by mifos.
the class JSONAjaxController method deleteCacheDir.
@RequestMapping("jsonAjax.ftl")
public ModelAndView deleteCacheDir(HttpServletResponse response) {
ModelAndView mav;
if (TestMode.MAIN == testingService.getTestMode()) {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
mav = new ModelAndView("pageNotFound");
} else {
mav = new ModelAndView("jsonAjax");
}
return mav;
}
use of org.springframework.web.servlet.ModelAndView in project head by mifos.
the class MonthClosingController method handleRequestInternal.
@RequestMapping(method = RequestMethod.GET)
public ModelAndView handleRequestInternal() {
Map<String, Object> model = new HashMap<String, Object>();
String monthClosingDateString = "-";
if (monthClosingServiceFacade.getMonthClosingDate() != null) {
monthClosingDateString = org.joda.time.format.DateTimeFormat.forStyle("S-").withLocale(Locale.getDefault()).print(new DateTime(monthClosingServiceFacade.getMonthClosingDate()));
}
model.put("currentDate", monthClosingDateString);
Map<String, Object> status = new HashMap<String, Object>();
List<String> errorMessages = new ArrayList<String>();
status.put("errorMessages", errorMessages);
ModelAndView modelAndView = new ModelAndView("monthClosing", "model", model);
modelAndView.addObject("status", status);
return modelAndView;
}
Aggregations