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.AbstractUISelectManyShuttle;
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 @Generated("component.stg")
45 public class UISelectManyShuttle
46 extends AbstractUISelectManyShuttle {
47
48 public static final String COMPONENT_TYPE = Tags.selectManyShuttle.componentType();
49
50 public static final String COMPONENT_FAMILY = "javax.faces.SelectMany";
51
52 private static final Collection<String> EVENT_NAMES = Arrays.asList("change", "click", "dblclick", "focus", "blur");
53
54 @Override
55 public Collection<String> getEventNames() {
56 return EVENT_NAMES;
57 }
58
59 @Override
60 public String getDefaultEventName() {
61 return "change";
62 }
63
64
65 enum PropertyKeys {
66 markup,
67 selectedLabel,
68 labelLayout,
69 focus,
70 tabIndex,
71 label,
72 help,
73 unselectedLabel,
74 readonly,
75 size,
76 customClass,
77 disabled,
78 tip,
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 public java.lang.String getSelectedLabel() {
103 return (java.lang.String) getStateHelper().eval(PropertyKeys.selectedLabel);
104 }
105
106 public void setSelectedLabel(java.lang.String selectedLabel) {
107 getStateHelper().put(PropertyKeys.selectedLabel, selectedLabel);
108 }
109
110
111
112
113
114
115
116
117 public org.apache.myfaces.tobago.component.LabelLayout getLabelLayout() {
118 org.apache.myfaces.tobago.component.LabelLayout labelLayout = (org.apache.myfaces.tobago.component.LabelLayout) getStateHelper().eval(PropertyKeys.labelLayout);
119 if (labelLayout != null) {
120 return labelLayout;
121 }
122 return getLabel() != null ? org.apache.myfaces.tobago.component.LabelLayout.flexLeft : org.apache.myfaces.tobago.component.LabelLayout.none;
123 }
124
125 public void setLabelLayout(org.apache.myfaces.tobago.component.LabelLayout labelLayout) {
126 getStateHelper().put(PropertyKeys.labelLayout, labelLayout);
127 }
128
129
130
131
132
133 public boolean isFocus() {
134 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.focus);
135 if (bool != null) {
136 return bool;
137 }
138 return false;
139 }
140
141 public void setFocus(boolean focus) {
142 getStateHelper().put(PropertyKeys.focus, focus);
143 }
144
145
146
147
148
149
150
151
152
153
154
155
156 public java.lang.Integer getTabIndex() {
157 Number value = (Number) getStateHelper().eval(PropertyKeys.tabIndex);
158 if (value != null) {
159 return value.intValue();
160 }
161 return null;
162 }
163
164 public void setTabIndex(java.lang.Integer tabIndex) {
165 getStateHelper().put(PropertyKeys.tabIndex, tabIndex);
166 }
167
168
169
170
171
172 public java.lang.String getLabel() {
173 return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
174 }
175
176 public void setLabel(java.lang.String label) {
177 getStateHelper().put(PropertyKeys.label, label);
178 }
179
180
181
182
183
184 public java.lang.String getHelp() {
185 return (java.lang.String) getStateHelper().eval(PropertyKeys.help);
186 }
187
188 public void setHelp(java.lang.String help) {
189 getStateHelper().put(PropertyKeys.help, help);
190 }
191
192
193
194
195
196 public java.lang.String getUnselectedLabel() {
197 return (java.lang.String) getStateHelper().eval(PropertyKeys.unselectedLabel);
198 }
199
200 public void setUnselectedLabel(java.lang.String unselectedLabel) {
201 getStateHelper().put(PropertyKeys.unselectedLabel, unselectedLabel);
202 }
203
204
205
206
207
208 public boolean isReadonly() {
209 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.readonly);
210 if (bool != null) {
211 return bool;
212 }
213 return false;
214 }
215
216 public void setReadonly(boolean readonly) {
217 getStateHelper().put(PropertyKeys.readonly, readonly);
218 }
219
220
221
222
223
224 public java.lang.Integer getSize() {
225 Number value = (Number) getStateHelper().eval(PropertyKeys.size);
226 if (value != null) {
227 return value.intValue();
228 }
229 return null;
230 }
231
232 public void setSize(java.lang.Integer size) {
233 getStateHelper().put(PropertyKeys.size, size);
234 }
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253 public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
254 return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
255 }
256
257 public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
258 getStateHelper().put(PropertyKeys.customClass, customClass);
259 }
260
261
262
263
264
265 public boolean isDisabled() {
266 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
267 if (bool != null) {
268 return bool;
269 }
270 return false;
271 }
272
273 public void setDisabled(boolean disabled) {
274 getStateHelper().put(PropertyKeys.disabled, disabled);
275 }
276
277
278
279
280
281 public java.lang.String getTip() {
282 return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
283 }
284
285 public void setTip(java.lang.String tip) {
286 getStateHelper().put(PropertyKeys.tip, tip);
287 }
288
289
290 @Override
291 public void restoreState(FacesContext context, Object state) {
292
293 pushComponentToEL(context, this);
294 super.restoreState(context, state);
295 popComponentFromEL(context);
296 }
297
298 }