1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.demo.kitchensink;
17
18 import org.kuali.rice.krad.util.GlobalVariables;
19 import org.kuali.rice.krad.web.controller.UifControllerBase;
20 import org.kuali.rice.krad.web.form.UifFormBase;
21 import org.springframework.stereotype.Controller;
22 import org.springframework.validation.BindingResult;
23 import org.springframework.web.bind.annotation.ModelAttribute;
24 import org.springframework.web.bind.annotation.RequestMapping;
25 import org.springframework.web.bind.annotation.RequestMethod;
26 import org.springframework.web.servlet.ModelAndView;
27
28 import javax.servlet.http.HttpServletRequest;
29 import javax.servlet.http.HttpServletResponse;
30
31
32
33
34
35
36
37
38 @Controller
39 @RequestMapping(value = "/collegeapp")
40 public class TrainingApplicationController extends UifControllerBase {
41
42 @Override
43 protected UifFormBase createInitialForm() {
44 return new TrainingApplicationForm();
45 }
46
47 @RequestMapping(method = RequestMethod.POST, params = "methodToCall=submit")
48 public ModelAndView submit(@ModelAttribute("KualiForm") UifFormBase uifForm, BindingResult result,
49 HttpServletRequest request, HttpServletResponse response) {
50
51 uifForm.getView().setReadOnly(true);
52
53 GlobalVariables.getMessageMap().putInfo("Training-CollegeApplicationPage", "message.route.successful");
54
55 return getModelAndView(uifForm);
56 }
57 }