1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.widget;
17
18 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20 import org.kuali.rice.krad.uif.component.ClientSideState;
21 import org.kuali.rice.krad.uif.component.Component;
22 import org.kuali.rice.krad.uif.util.LifecycleElement;
23
24
25
26
27
28
29 @BeanTag(name = "disclosure", parent = "Uif-Disclosure")
30 public class Disclosure extends WidgetBase {
31 private static final long serialVersionUID = 1238789480161901850L;
32
33 private String collapsedIconClass;
34 private String expandedIconClass;
35
36 private boolean renderIcon;
37
38 private int animationSpeed;
39
40 @ClientSideState(variableName = "open")
41 private boolean defaultOpen;
42 private boolean ajaxRetrievalWhenOpened;
43
44 public Disclosure() {
45 super();
46
47 defaultOpen = true;
48 renderIcon = true;
49 }
50
51
52
53
54
55
56 @Override
57 public void performApplyModel(Object model, LifecycleElement parent) {
58 super.performApplyModel(model, parent);
59
60 if (parent instanceof Component && ajaxRetrievalWhenOpened) {
61 ((Component) parent).setForceSessionPersistence(true);
62 }
63 }
64
65
66
67
68
69
70
71
72 @BeanTagAttribute
73 public String getCollapsedIconClass() {
74 return collapsedIconClass;
75 }
76
77
78
79
80
81
82 public void setCollapsedIconClass(String collapsedIconClass) {
83 this.collapsedIconClass = collapsedIconClass;
84 }
85
86
87
88
89
90
91
92
93 @BeanTagAttribute
94 public String getExpandedIconClass() {
95 return expandedIconClass;
96 }
97
98
99
100
101
102
103 public void setExpandedIconClass(String expandedIconClass) {
104 this.expandedIconClass = expandedIconClass;
105 }
106
107
108
109
110
111
112 @BeanTagAttribute
113 public boolean isRenderIcon() {
114 return renderIcon;
115 }
116
117
118
119
120
121
122 public void setRenderIcon(boolean renderIcon) {
123 this.renderIcon = renderIcon;
124 }
125
126
127
128
129
130
131
132 @BeanTagAttribute
133 public int getAnimationSpeed() {
134 return this.animationSpeed;
135 }
136
137
138
139
140
141
142 public void setAnimationSpeed(int animationSpeed) {
143 this.animationSpeed = animationSpeed;
144 }
145
146
147
148
149
150
151
152 @BeanTagAttribute
153 public boolean isDefaultOpen() {
154 return this.defaultOpen;
155 }
156
157
158
159
160
161
162 public void setDefaultOpen(boolean defaultOpen) {
163 this.defaultOpen = defaultOpen;
164 }
165
166
167
168
169
170
171
172
173 @BeanTagAttribute
174 public boolean isAjaxRetrievalWhenOpened() {
175 return ajaxRetrievalWhenOpened;
176 }
177
178
179
180
181
182
183 public void setAjaxRetrievalWhenOpened(boolean ajaxRetrievalWhenOpened) {
184 this.ajaxRetrievalWhenOpened = ajaxRetrievalWhenOpened;
185 }
186 }