1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sys.document.web.util;
17
18 import javax.servlet.jsp.PageContext;
19
20 import org.kuali.rice.kns.util.KNSGlobalVariables;
21 import org.kuali.rice.kns.util.WebUtils;
22 import org.kuali.rice.kns.web.struts.form.pojo.PojoFormBase;
23
24
25
26
27 public class RendererUtil {
28
29
30
31
32
33
34
35 public static void registerEditableProperty(PageContext pageContext, String editablePropertyName) {
36 PojoFormBase form = null;
37 if (pageContext.getRequest().getAttribute(WebUtils.KEY_KUALI_FORM_IN_SESSION) != null) {
38 form = (PojoFormBase) pageContext.getRequest().getAttribute(WebUtils.KEY_KUALI_FORM_IN_SESSION);
39 }
40 else if (pageContext.getSession().getAttribute(WebUtils.KEY_KUALI_FORM_IN_SESSION) != null) {
41 form = (PojoFormBase) pageContext.getSession().getAttribute(WebUtils.KEY_KUALI_FORM_IN_SESSION);
42 }
43 else {
44 form = (PojoFormBase) KNSGlobalVariables.getKualiForm();
45 }
46
47 if (form != null) {
48 form.registerEditableProperty(editablePropertyName);
49 }
50 }
51 }