List of usage examples for org.springframework.web.servlet ModelAndView ModelAndView
public ModelAndView(View view)
From source file:com.seabee.snapdragon.controller.SecurityNavigation.java
@RequestMapping(value = "/success-login", method = RequestMethod.GET) public ModelAndView successLogin() { return new ModelAndView("success-login"); }
From source file:abid.password.springmvc.controller.HomeController.java
@RequestMapping(method = RequestMethod.GET, value = { "/", "/index" }) public ModelAndView handleGetHomePage() { ModelAndView model = new ModelAndView("index"); return model; }
From source file:av1.controller.ProcessoController.java
@RequestMapping("listar-processo") public ModelAndView listar() { ProcessoDAOImpl dao = new ProcessoDAOImpl(); List<Processo> processo = dao.listar(); ModelAndView mv = new ModelAndView("processo"); mv.addObject("processos", processo); return mv;//from ww w. java 2 s .c o m }
From source file:com.mycompany.controller.ReportController.java
@RequestMapping("admin_report_txt") public ModelAndView generateTXT() throws JAXBException { ReportDao report = reportFactory.getReport("TXT"); report.generate();/*from ww w . java 2 s . c o m*/ return new ModelAndView("redirect:admin_report"); }
From source file:org.ednovo.gooru.converter.serializer.ConversionSerializer.java
public static ModelAndView toJsonModelAndView(Object object) throws Exception { ModelAndView jsonmodel = new ModelAndView(REST_MODEL); jsonmodel.addObject(MODEL, serializeToJsonObject(object)); return jsonmodel; }
From source file:com.mycompany.controller.BookController.java
@RequestMapping("admin_book_form") public ModelAndView getForm(@ModelAttribute Book book) { return new ModelAndView("admin_book_form"); }
From source file:com.garethahealy.eap.frontend.IndexController.java
@RequestMapping(value = "/") public ModelAndView index(ModelMap model) { return new ModelAndView("index"); }
From source file:de.asgarbayli.rashad.hbd.controllers.DashboardController.java
@RequestMapping(value = Navigation.DASHBOARD, method = RequestMethod.GET) public ModelAndView showParameters() { return new ModelAndView(Navigation.DASHBOARD); }
From source file:com.yahoo.dba.perf.myperf.springmvc.DatalistController.java
@Override protected ModelAndView handleRequestImpl(HttpServletRequest req, HttpServletResponse resp) throws Exception { String dataType = req.getParameter("t"); String contentType = req.getParameter("ct"); ModelAndView mv = null;// w w w.j a v a 2s .c o m if ("json".equalsIgnoreCase(contentType)) { resp.setContentType("application/json"); mv = new ModelAndView(jsonView); } else { resp.setContentType("text/xml"); mv = new ModelAndView(xmlView); } ResultList rs = null; if ("dbhosts".equalsIgnoreCase(dataType)) rs = this.retrieveDbHostList(req); else if ("dbinfo".equalsIgnoreCase(dataType)) rs = this.retrieveDbHostInfo(req); if ("json".equalsIgnoreCase(contentType)) { mv.addObject("json_result", ResultListUtil.toJSONString(rs, null, 0, "OK")); } else { if (rs == null || rs.getRows().size() == 0) mv.addObject("status", 0); else { mv.addObject("status", rs.getRows().size()); mv.addObject("results", rs); } } return mv; }
From source file:pplabmed.controller.perfilesController.java
@RequestMapping(value = "guardaPerfil.htm", method = RequestMethod.POST) public ModelAndView guarda(@RequestParam("nombre") String nombre, @RequestParam("desc") String desc, @RequestParam("per") String per, @RequestParam("bol") String bol) throws Exception { ModelAndView mv = new ModelAndView("cargatempPermisos"); perfilDAO opc = new perfilDAO(); String p1 = new String(nombre.getBytes("ISO-8859-1"), "UTF-8"); String p2 = new String(desc.getBytes("ISO-8859-1"), "UTF-8"); String idper = opc.guardaPerfil(p1, p2, bol); String[] per1 = per.split(","); for (int i = 0; i < per1.length; i++) { String insertPermiso = opc.guardaPerfilp(Integer.parseInt(per1[i]), Integer.parseInt(idper)); }/* ww w. ja va 2s .c om*/ mv.addObject("resp", "No"); return mv; }