1 | package edu.iu.uis.sit.portal.web.delegates; |
2 | |
3 | import java.util.HashMap; |
4 | import java.util.Map; |
5 | |
6 | import javax.servlet.http.HttpServletRequest; |
7 | import javax.servlet.http.HttpServletResponse; |
8 | |
9 | import org.springframework.web.servlet.ModelAndView; |
10 | |
11 | public class TestDelegate { |
12 | |
13 | public ModelAndView start(HttpServletRequest request, HttpServletResponse response) throws Exception { |
14 | if ("doit".equals(request.getParameter("reset"))) { |
15 | return new ModelAndView("redirectToCurrentPage", null); |
16 | } |
17 | |
18 | String modifying = "true"; |
19 | if (request.getSession().getAttribute("modifying") != null) { |
20 | modifying = "true".equals((String)request.getSession().getAttribute("modifying")) ? "false" : "true"; |
21 | } |
22 | request.getSession().setAttribute("modifying", modifying); |
23 | Map model = new HashMap(); |
24 | //model.put("driverConfig", config); |
25 | return new ModelAndView("redirectToCurrentPage", model); |
26 | } |
27 | |
28 | } |