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-bean", 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 public String getCollapsedIconClass() {
73 return collapsedIconClass;
74 }
75
76
77
78
79
80
81 public void setCollapsedIconClass(String collapsedIconClass) {
82 this.collapsedIconClass = collapsedIconClass;
83 }
84
85
86
87
88
89
90
91
92 public String getExpandedIconClass() {
93 return expandedIconClass;
94 }
95
96
97
98
99
100
101 public void setExpandedIconClass(String expandedIconClass) {
102 this.expandedIconClass = expandedIconClass;
103 }
104
105
106
107
108
109
110 public boolean isRenderIcon() {
111 return renderIcon;
112 }
113
114
115
116
117
118
119 public void setRenderIcon(boolean renderIcon) {
120
121 this.renderIcon = renderIcon;
122 }
123
124
125
126
127
128
129
130 @BeanTagAttribute(name = "animationSpeed")
131 public int getAnimationSpeed() {
132 return this.animationSpeed;
133 }
134
135
136
137
138
139
140 public void setAnimationSpeed(int animationSpeed) {
141 this.animationSpeed = animationSpeed;
142 }
143
144
145
146
147
148
149
150 @BeanTagAttribute(name = "defaultOpen")
151 public boolean isDefaultOpen() {
152 return this.defaultOpen;
153 }
154
155
156
157
158
159
160 public void setDefaultOpen(boolean defaultOpen) {
161 this.defaultOpen = defaultOpen;
162 }
163
164
165
166
167
168
169
170
171 public boolean isAjaxRetrievalWhenOpened() {
172 return ajaxRetrievalWhenOpened;
173 }
174
175
176
177
178
179
180 public void setAjaxRetrievalWhenOpened(boolean ajaxRetrievalWhenOpened) {
181 this.ajaxRetrievalWhenOpened = ajaxRetrievalWhenOpened;
182 }
183 }