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.AbstractUISelectManyCheckbox;
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 UISelectManyCheckbox
47 extends AbstractUISelectManyCheckbox {
48
49 public static final String COMPONENT_TYPE = Tags.selectManyCheckbox.componentType();
50
51 public static final String COMPONENT_FAMILY = "javax.faces.SelectMany";
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 help,
73 inline,
74 readonly,
75 customClass,
76 disabled,
77 tip,
78 renderRange,
79 }
80
81 public String getFamily() {
82 return COMPONENT_FAMILY;
83 }
84
85
86 public org.apache.myfaces.tobago.context.Markup getMarkup() {
87 Object object = getStateHelper().eval(PropertyKeys.markup);
88 if (object != null) {
89 return Markup.valueOf(object);
90 }
91 return null;
92 }
93
94 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
95 getStateHelper().put(PropertyKeys.markup, markup);
96 }
97
98
99
100
101
102
103
104
105 public org.apache.myfaces.tobago.component.LabelLayout getLabelLayout() {
106 org.apache.myfaces.tobago.component.LabelLayout labelLayout = (org.apache.myfaces.tobago.component.LabelLayout) getStateHelper().eval(PropertyKeys.labelLayout);
107 if (labelLayout != null) {
108 return labelLayout;
109 }
110 return getLabel() != null ? org.apache.myfaces.tobago.component.LabelLayout.flexLeft : org.apache.myfaces.tobago.component.LabelLayout.none;
111 }
112
113 public void setLabelLayout(org.apache.myfaces.tobago.component.LabelLayout labelLayout) {
114 getStateHelper().put(PropertyKeys.labelLayout, labelLayout);
115 }
116
117
118
119
120
121 public boolean isFocus() {
122 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.focus);
123 if (bool != null) {
124 return bool;
125 }
126 return false;
127 }
128
129 public void setFocus(boolean focus) {
130 getStateHelper().put(PropertyKeys.focus, focus);
131 }
132
133
134
135
136
137
138
139
140
141
142
143
144 public java.lang.Integer getTabIndex() {
145 Number value = (Number) getStateHelper().eval(PropertyKeys.tabIndex);
146 if (value != null) {
147 return value.intValue();
148 }
149 return null;
150 }
151
152 public void setTabIndex(java.lang.Integer tabIndex) {
153 getStateHelper().put(PropertyKeys.tabIndex, tabIndex);
154 }
155
156
157
158
159
160 public java.lang.String getLabel() {
161 return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
162 }
163
164 public void setLabel(java.lang.String label) {
165 getStateHelper().put(PropertyKeys.label, label);
166 }
167
168
169
170
171
172 public java.lang.String getHelp() {
173 return (java.lang.String) getStateHelper().eval(PropertyKeys.help);
174 }
175
176 public void setHelp(java.lang.String help) {
177 getStateHelper().put(PropertyKeys.help, help);
178 }
179
180
181
182
183
184 public boolean isInline() {
185 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.inline);
186 if (bool != null) {
187 return bool;
188 }
189 return false;
190 }
191
192 public void setInline(boolean inline) {
193 getStateHelper().put(PropertyKeys.inline, inline);
194 }
195
196
197
198
199
200 public boolean isReadonly() {
201 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.readonly);
202 if (bool != null) {
203 return bool;
204 }
205 return false;
206 }
207
208 public void setReadonly(boolean readonly) {
209 getStateHelper().put(PropertyKeys.readonly, readonly);
210 }
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229 public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
230 return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
231 }
232
233 public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
234 getStateHelper().put(PropertyKeys.customClass, customClass);
235 }
236
237
238
239
240
241 public boolean isDisabled() {
242 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
243 if (bool != null) {
244 return bool;
245 }
246 return false;
247 }
248
249 public void setDisabled(boolean disabled) {
250 getStateHelper().put(PropertyKeys.disabled, disabled);
251 }
252
253
254
255
256
257 public java.lang.String getTip() {
258 return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
259 }
260
261 public void setTip(java.lang.String tip) {
262 getStateHelper().put(PropertyKeys.tip, tip);
263 }
264
265
266
267
268
269 public java.lang.String getRenderRange() {
270 return (java.lang.String) getStateHelper().eval(PropertyKeys.renderRange);
271 }
272
273 public void setRenderRange(java.lang.String renderRange) {
274 getStateHelper().put(PropertyKeys.renderRange, renderRange);
275 }
276
277
278 @Override
279 public void restoreState(FacesContext context, Object state) {
280
281 pushComponentToEL(context, this);
282 super.restoreState(context, state);
283 popComponentFromEL(context);
284 }
285
286 }