1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.web.controller;
17
18 import org.kuali.rice.krad.web.bind.UifServletRequestDataBinder;
19 import org.kuali.rice.krad.web.form.UifFormBase;
20 import org.springframework.web.bind.ServletRequestDataBinder;
21 import org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter;
22
23 import javax.servlet.http.HttpServletRequest;
24
25
26
27
28
29
30 public class UifAnnotationMethodHandleAdapter extends AnnotationMethodHandlerAdapter {
31
32 @Override
33 protected ServletRequestDataBinder createBinder(HttpServletRequest request, Object target,
34 String objectName) throws Exception {
35 if (target != null) {
36
37
38 if (target instanceof UifFormBase) {
39 return new UifServletRequestDataBinder(target, objectName);
40 }
41 }
42
43 return super.createBinder(request, target, objectName);
44 }
45 }