protected ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
Client client = CH.getOptional(getDao(), Client.class, request.getParameter("client"));
WorkType type = CH.getOptional(getDao(), WorkType.class, request.getParameter("type"));
Lpu lpu = CH.getOptional(getDao(), Lpu.class, request.getParameter("lpu"));
Collaborator collab = CH.getOptional(getDao(), Collaborator.class, request.getParameter("collaborator"));
if (client == null) {
return IncomingParamsValidator.redirectTo("/reception/index.htm", client, type, lpu, collab);
} else if (collab == null) {
return IncomingParamsValidator.redirectTo("/reception/collaborator.htm", client, type, lpu, collab);