1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.mock;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.rice.krad.uif.util.SessionTransient;
20 import org.kuali.rice.krad.web.form.UifFormBase;
21 import org.springframework.web.bind.annotation.RequestMethod;
22
23 import javax.servlet.http.HttpServletRequest;
24 import java.util.Map;
25
26
27
28
29
30
31 public class DynaForm extends UifFormBase {
32 private static final long serialVersionUID = -2112462466031059707L;
33
34 private Map<String, Object> data;
35 private Map<String, Boolean> booleanData;
36
37 @SessionTransient
38 private boolean initialGetRequest;
39
40
41
42
43 public DynaForm() {
44 super();
45 }
46
47
48
49
50 @Override
51 public void postBind(HttpServletRequest request) {
52
53 if (StringUtils.isBlank(getFormKey()) && request.getMethod().equals(RequestMethod.GET.name())) {
54 initialGetRequest = true;
55 }
56
57 super.postBind(request);
58 }
59
60
61
62
63
64
65 public Map<String, Object> getData() {
66 return data;
67 }
68
69
70
71
72 public void setData(Map<String, Object> data) {
73 this.data = data;
74 }
75
76
77
78
79
80
81 public Map<String, Boolean> getBooleanData() {
82 return booleanData;
83 }
84
85
86
87
88 public void setBooleanData(Map<String, Boolean> booleanData) {
89 this.booleanData = booleanData;
90 }
91
92
93
94
95
96
97 public boolean isInitialGetRequest() {
98 return initialGetRequest;
99 }
100 }