1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.component;
21
22 import javax.faces.context.FacesContext;
23 import org.apache.myfaces.tobago.context.Markup;
24 import org.apache.myfaces.tobago.internal.component.AbstractUISelectBooleanCheckbox;
25 import org.apache.myfaces.tobago.renderkit.css.CustomClass;
26 import org.apache.myfaces.tobago.internal.util.ArrayUtils;
27 import org.apache.myfaces.tobago.internal.util.StringUtils;
28 import org.apache.myfaces.tobago.internal.util.Deprecation;
29 import org.apache.myfaces.tobago.component.Tags;
30 import javax.annotation.Generated;
31 import javax.el.ELException;
32 import javax.faces.FacesException;
33 import java.util.Arrays;
34 import java.util.ArrayList;
35 import java.util.Collection;
36 import java.util.List;
37 import javax.el.MethodExpression;
38 import javax.el.ValueExpression;
39
40
41
42
43
44
45 @Generated("component.stg")
46 public class UISelectBooleanCheckbox
47 extends AbstractUISelectBooleanCheckbox {
48
49 public static final String COMPONENT_TYPE = Tags.selectBooleanCheckbox.componentType();
50
51 public static final String COMPONENT_FAMILY = "javax.faces.SelectBoolean";
52
53 private static final Collection<String> EVENT_NAMES = Arrays.asList("change", "click", "dblclick", "focus", "blur");
54
55 @Override
56 public Collection<String> getEventNames() {
57 return EVENT_NAMES;
58 }
59
60 @Override
61 public String getDefaultEventName() {
62 return "change";
63 }
64
65
66 enum PropertyKeys {
67 markup,
68 labelLayout,
69 focus,
70 tabIndex,
71 label,
72 itemLabel,
73 itemImage,
74 help,
75 readonly,
76 accessKey,
77 customClass,
78 disabled,
79 tip,
80 }
81
82 public String getFamily() {
83 return COMPONENT_FAMILY;
84 }
85
86
87 public org.apache.myfaces.tobago.context.Markup getMarkup() {
88 Object object = getStateHelper().eval(PropertyKeys.markup);
89 if (object != null) {
90 return Markup.valueOf(object);
91 }
92 return null;
93 }
94
95 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
96 getStateHelper().put(PropertyKeys.markup, markup);
97 }
98
99
100
101
102
103
104
105
106 public org.apache.myfaces.tobago.component.LabelLayout getLabelLayout() {
107 org.apache.myfaces.tobago.component.LabelLayout labelLayout = (org.apache.myfaces.tobago.component.LabelLayout) getStateHelper().eval(PropertyKeys.labelLayout);
108 if (labelLayout != null) {
109 return labelLayout;
110 }
111 return getLabel() != null ? org.apache.myfaces.tobago.component.LabelLayout.flexLeft : org.apache.myfaces.tobago.component.LabelLayout.none;
112 }
113
114 public void setLabelLayout(org.apache.myfaces.tobago.component.LabelLayout labelLayout) {
115 getStateHelper().put(PropertyKeys.labelLayout, labelLayout);
116 }
117
118
119
120
121
122 public boolean isFocus() {
123 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.focus);
124 if (bool != null) {
125 return bool;
126 }
127 return false;
128 }
129
130 public void setFocus(boolean focus) {
131 getStateHelper().put(PropertyKeys.focus, focus);
132 }
133
134
135
136
137
138
139
140
141
142
143
144
145 public java.lang.Integer getTabIndex() {
146 Number value = (Number) getStateHelper().eval(PropertyKeys.tabIndex);
147 if (value != null) {
148 return value.intValue();
149 }
150 return null;
151 }
152
153 public void setTabIndex(java.lang.Integer tabIndex) {
154 getStateHelper().put(PropertyKeys.tabIndex, tabIndex);
155 }
156
157
158
159
160
161 public java.lang.String getLabel() {
162 return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
163 }
164
165 public void setLabel(java.lang.String label) {
166 getStateHelper().put(PropertyKeys.label, label);
167 }
168
169
170
171
172
173 public java.lang.String getItemLabel() {
174 return (java.lang.String) getStateHelper().eval(PropertyKeys.itemLabel);
175 }
176
177 public void setItemLabel(java.lang.String itemLabel) {
178 getStateHelper().put(PropertyKeys.itemLabel, itemLabel);
179 }
180
181
182
183
184
185 public java.lang.String getItemImage() {
186 return (java.lang.String) getStateHelper().eval(PropertyKeys.itemImage);
187 }
188
189 public void setItemImage(java.lang.String itemImage) {
190 getStateHelper().put(PropertyKeys.itemImage, itemImage);
191 }
192
193
194
195
196
197 public java.lang.String getHelp() {
198 return (java.lang.String) getStateHelper().eval(PropertyKeys.help);
199 }
200
201 public void setHelp(java.lang.String help) {
202 getStateHelper().put(PropertyKeys.help, help);
203 }
204
205
206
207
208
209 public boolean isReadonly() {
210 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.readonly);
211 if (bool != null) {
212 return bool;
213 }
214 return false;
215 }
216
217 public void setReadonly(boolean readonly) {
218 getStateHelper().put(PropertyKeys.readonly, readonly);
219 }
220
221
222
223
224
225 public java.lang.Character getAccessKey() {
226 return (java.lang.Character) getStateHelper().eval(PropertyKeys.accessKey);
227 }
228
229 public void setAccessKey(java.lang.Character accessKey) {
230 getStateHelper().put(PropertyKeys.accessKey, accessKey);
231 }
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250 public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
251 return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
252 }
253
254 public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
255 getStateHelper().put(PropertyKeys.customClass, customClass);
256 }
257
258
259
260
261
262 public boolean isDisabled() {
263 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
264 if (bool != null) {
265 return bool;
266 }
267 return false;
268 }
269
270 public void setDisabled(boolean disabled) {
271 getStateHelper().put(PropertyKeys.disabled, disabled);
272 }
273
274
275
276
277
278 public java.lang.String getTip() {
279 return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
280 }
281
282 public void setTip(java.lang.String tip) {
283 getStateHelper().put(PropertyKeys.tip, tip);
284 }
285
286
287 @Override
288 public void restoreState(FacesContext context, Object state) {
289
290 pushComponentToEL(context, this);
291 super.restoreState(context, state);
292 popComponentFromEL(context);
293 }
294
295 }