1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.base.web;
17
18 import javax.servlet.http.HttpServletRequest;
19
20 import org.apache.commons.lang.StringUtils;
21 import org.kuali.rice.kns.util.ActionFormUtilMap;
22 import org.kuali.rice.kns.util.WebUtils;
23 import org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase;
24
25 public class TkDocumentForm extends KualiDocumentFormBase {
26
27
28
29
30 private static final long serialVersionUID = 1L;
31
32 private String documentId;
33
34 private String methodToCall;
35
36 public String getMethodToCall() {
37 return methodToCall;
38 }
39
40 public void setMethodToCall(String methodToCall) {
41 this.methodToCall = methodToCall;
42 }
43
44 public String getDocumentId() {
45 return documentId;
46 }
47
48 public void setDocumentId(String documentId) {
49 this.documentId = documentId;
50 }
51
52 @Override
53 public boolean isPropertyEditable(String propertyName) {
54 return true;
55 }
56
57 @Override
58 public boolean isPropertyNonEditableButRequired(String propertyName) {
59 return true;
60 }
61
62 @Override
63 public void populate(HttpServletRequest request) {
64 super.populate(request);
65 ((ActionFormUtilMap) getActionFormUtilMap()).setCacheValueFinderResults(false);
66
67 if (this.getMethodToCall() == null || StringUtils.isEmpty(this.getMethodToCall())) {
68 setMethodToCall(WebUtils.parseMethodToCall(this, request));
69 }
70 }
71 }