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 java.io.IOException;
19
20 import javax.servlet.jsp.JspException;
21 import javax.servlet.jsp.JspWriter;
22 import javax.servlet.jsp.PageContext;
23 import javax.servlet.jsp.tagext.Tag;
24
25
26
27
28 public class AccountingLineTableFooterRenderer implements Renderer {
29
30
31
32
33
34 public void clear() {
35
36 }
37
38
39
40
41
42 public void render(PageContext pageContext, Tag parentTag) throws JspException {
43 JspWriter out = pageContext.getOut();
44
45 try {
46 out.write(buildTableEnd());
47 out.write(buildKualiElementsNotifier());
48 out.write(buildDivEnd());
49 }
50 catch (IOException ioe) {
51 throw new JspException("Difficulty rendering accounting line table footer", ioe);
52 }
53 }
54
55
56
57
58
59 protected String buildTableEnd() {
60 return "</table>\n";
61 }
62
63
64
65
66
67 protected String buildKualiElementsNotifier() {
68 StringBuilder notifier = new StringBuilder();
69 notifier.append("<SCRIPT type=\"text/javascript\">\n");
70 notifier.append("\tvar kualiForm = document.forms['KualiForm'];\n");
71 notifier.append("\tvar kualiElements = kualiForm.elements;\n");
72 notifier.append("</SCRIPT>\n");
73 return notifier.toString();
74 }
75
76
77
78
79
80 protected String buildDivEnd() {
81 return "</div>\n";
82 }
83 }