1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sys.document.web.renderers;
17
18 import javax.servlet.jsp.JspException;
19 import javax.servlet.jsp.PageContext;
20 import javax.servlet.jsp.tagext.Tag;
21
22 import org.kuali.rice.kns.web.taglib.html.KNSTextareaTag;
23 import org.springframework.web.util.HtmlUtils;
24
25
26
27
28 public class TextAreaRenderer extends FieldRendererBase {
29 private KNSTextareaTag tag = new KNSTextareaTag();
30
31
32
33
34
35 public void clear() {
36 super.clear();
37 tag.setPageContext(null);
38 tag.setParent(null);
39 tag.setProperty(null);
40 tag.setValue(null);
41 tag.setTitle(null);
42 tag.setRows(null);
43 tag.setCols(null);
44 tag.setStyleClass(null);
45 tag.setStyleId(null);
46 tag.setTabindex(null);
47 }
48
49
50
51
52
53 public void render(PageContext pageContext, Tag parentTag) throws JspException {
54 tag.setPageContext(pageContext);
55 tag.setParent(parentTag);
56 tag.setProperty(getFieldName());
57 tag.setValue(getField().getPropertyValue());
58 tag.setTitle(this.getAccessibleTitle());
59 tag.setRows(Integer.toString(getField().getRows()));
60 tag.setCols(Integer.toString(getField().getCols()));
61 tag.setStyleClass(getField().getStyleClass());
62 tag.setStyleId(getFieldName());
63
64 tag.doStartTag();
65 tag.doEndTag();
66
67 renderQuickFinderIfNecessary(pageContext, parentTag);
68
69 if (isShowError()) {
70 renderErrorIcon(pageContext);
71 }
72 }
73
74
75
76
77
78 public boolean renderQuickfinder() {
79 return true;
80 }
81
82 }