1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.sampleu.demo.kitchensink;
18
19 import org.apache.commons.lang.RandomStringUtils;
20 import org.kuali.rice.krad.util.GlobalVariables;
21 import org.kuali.rice.krad.web.controller.UifControllerBase;
22 import org.kuali.rice.krad.web.form.UifFormBase;
23 import org.springframework.stereotype.Controller;
24 import org.springframework.validation.BindingResult;
25 import org.springframework.web.bind.annotation.ModelAttribute;
26 import org.springframework.web.bind.annotation.RequestMapping;
27 import org.springframework.web.servlet.ModelAndView;
28
29 import javax.servlet.http.HttpServletRequest;
30 import javax.servlet.http.HttpServletResponse;
31
32
33
34
35
36
37 @Controller
38 @RequestMapping(value = "/configuration-test-view-uif-controller")
39 public class ConfigurationTestViewUifController extends UifControllerBase {
40
41 @Override
42 protected UifFormBase createInitialForm(HttpServletRequest request) {
43 return new UifComponentsTestForm();
44 }
45
46
47
48
49 @Override
50 @RequestMapping(params = "methodToCall=start")
51 public ModelAndView start(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
52 HttpServletRequest request, HttpServletResponse response) {
53 String randomYear = RandomStringUtils.randomNumeric(2);
54 GlobalVariables.getMessageMap().putInfo("growl.testing.apostrophe", "sampleapp.growl.testmsg", "'" + randomYear);
55
56 return super.start(form, result, request, response);
57 }
58 }