1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.fp.document.web;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.ole.sys.document.web.renderers.CollectionPropertiesCurious;
20 import org.kuali.ole.sys.document.web.renderers.GroupTotalRenderer;
21
22
23
24
25 public class ProcurementCardGroupTotalRenderer extends GroupTotalRenderer implements CollectionPropertiesCurious {
26 private String collectionProperty = null;
27 private String simpleTotalProperty = null;
28
29
30
31
32 public void setCollectionItemProperty(String collectionItemProperty) {
33
34 }
35
36
37
38
39 public void setCollectionProperty(String collectionProperty) {
40 this.collectionProperty = collectionProperty;
41 }
42
43
44
45
46 @Override
47 public void clear() {
48 super.clear();
49 this.collectionProperty = null;
50 this.simpleTotalProperty = null;
51 }
52
53
54
55
56 @Override
57 public String getTotalProperty() {
58 if (!StringUtils.isBlank(collectionProperty)) {
59 return collectionProperty.replaceFirst("\\.[a-z]+AccountingLines", "")+"."+simpleTotalProperty;
60 }
61 return simpleTotalProperty;
62 }
63
64
65
66
67 @Override
68 public void setTotalProperty(String totalProperty) {
69 this.simpleTotalProperty = totalProperty;
70 }
71
72 }