View Javadoc

1   // ---------- Attention: Generated code, please do not modify! -----------  
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
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.layout.Display;
26  import org.apache.myfaces.tobago.layout.Measure;
27  import org.apache.commons.lang.ArrayUtils;
28  import org.apache.commons.lang.StringUtils;
29  import org.apache.myfaces.tobago.internal.util.Deprecation;
30  import org.apache.myfaces.tobago.renderkit.MarginValues;
31  import org.apache.myfaces.tobago.renderkit.SpacingValues;
32  import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
33  import javax.el.ELException;
34  import javax.faces.FacesException;
35  import java.util.ArrayList;
36  import java.util.List;
37  import javax.el.MethodExpression;
38  import javax.el.ValueExpression;
39  
40  /** 
41    * UIComponent class, generated from template {@code component2.0.stg} with class
42    * {@link org.apache.myfaces.tobago.internal.taglib.component.SelectManyShuttleTagDeclaration}.
43   */
44  public class UISelectManyShuttle
45      extends AbstractUISelectManyShuttle implements SupportsMarkup {
46  
47    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.SelectManyShuttle";
48  
49    public static final String COMPONENT_FAMILY = "javax.faces.SelectMany";
50  
51    private org.apache.myfaces.tobago.context.Markup currentMarkup;
52  
53    enum PropertyKeys {
54      markup,
55      marginLeft,
56      tabIndex,
57      minimumHeight,
58      unselectedLabel,
59      tip,
60      height,
61      minimumWidth,
62      rowSpan,
63      left,
64      focus,
65      columnSpan,
66      selectedLabel,
67      top,
68      maximumHeight,
69      currentWidth,
70      marginTop,
71      width,
72      marginRight,
73      currentHeight,
74      preferredHeight,
75      display,
76      label,
77      maximumWidth,
78      onchange,
79      preferredWidth,
80      marginBottom,
81      verticalIndex,
82      horizontalIndex,
83      readonly,
84      disabled,
85    }
86  
87    public String getFamily() {
88      return COMPONENT_FAMILY;
89    }
90  
91  
92    public org.apache.myfaces.tobago.context.Markup getMarkup() {
93      Object object = getStateHelper().eval(PropertyKeys.markup);
94      if (object != null) {
95        return Markup.valueOf(object);
96      }
97      return null;
98    }
99  
100   public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
101     getStateHelper().put(PropertyKeys.markup, markup);
102   }
103 
104   public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
105     Object object = getStateHelper().eval(PropertyKeys.marginLeft);
106     if (object != null) {
107        return Measure.valueOf(object);
108     }
109     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this);
110   }
111 
112   public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
113     getStateHelper().put(PropertyKeys.marginLeft, marginLeft);
114   }
115 
116   /**
117   Controls the navigation of the focus through the
118    input controls on a page with the Tab-Key.
119    The navigation starts from the element with
120    the lowest tabIndex value to the element with the highest value.
121    Elements that have identical tabIndex values should be navigated
122    in the order they appear in the character stream
123    Elements that are disabled or with a negative tabIndex
124    do not participate in the tabbing order.
125 
126   */
127   public java.lang.Integer getTabIndex() {
128     Number value  = (Number) getStateHelper().eval(PropertyKeys.tabIndex);
129     if (value != null) {
130       return value.intValue();
131     }
132     return null;
133   }
134 
135   public void setTabIndex(java.lang.Integer tabIndex) {
136     getStateHelper().put(PropertyKeys.tabIndex, tabIndex);
137   }
138 
139   public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
140     Object object = getStateHelper().eval(PropertyKeys.minimumHeight);
141     if (object != null) {
142        return Measure.valueOf(object);
143     }
144     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this);
145   }
146 
147   public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
148     getStateHelper().put(PropertyKeys.minimumHeight, minimumHeight);
149   }
150 
151   /**
152   A localized user presentable label for the left select box.
153 
154   */
155   public java.lang.String getUnselectedLabel() {
156     return (java.lang.String) getStateHelper().eval(PropertyKeys.unselectedLabel);
157   }
158 
159   public void setUnselectedLabel(java.lang.String unselectedLabel) {
160     getStateHelper().put(PropertyKeys.unselectedLabel, unselectedLabel);
161   }
162 
163   /**
164   Text value to display as tooltip.
165 
166   */
167   public java.lang.String getTip() {
168     return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
169   }
170 
171   public void setTip(java.lang.String tip) {
172     getStateHelper().put(PropertyKeys.tip, tip);
173   }
174 
175   /**
176   This value will usually be set by the layout manager.
177 
178   */
179   public org.apache.myfaces.tobago.layout.Measure getHeight() {
180     Object object = getStateHelper().eval(PropertyKeys.height);
181     if (object != null) {
182        return Measure.valueOf(object);
183     }
184     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this);
185   }
186 
187   public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
188     getStateHelper().put(PropertyKeys.height, height);
189   }
190 
191   public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
192     Object object = getStateHelper().eval(PropertyKeys.minimumWidth);
193     if (object != null) {
194        return Measure.valueOf(object);
195     }
196     return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this);
197   }
198 
199   public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
200     getStateHelper().put(PropertyKeys.minimumWidth, minimumWidth);
201   }
202 
203   public java.lang.Integer getRowSpan() {
204     Number value  = (Number) getStateHelper().eval(PropertyKeys.rowSpan);
205     if (value != null) {
206       return value.intValue();
207     }
208     return 1;
209   }
210 
211   public void setRowSpan(java.lang.Integer rowSpan) {
212     getStateHelper().put(PropertyKeys.rowSpan, rowSpan);
213   }
214 
215   /**
216   This value will usually be set by the layout manager.
217 
218   */
219   public org.apache.myfaces.tobago.layout.Measure getLeft() {
220     Object object = getStateHelper().eval(PropertyKeys.left);
221     if (object != null) {
222        return Measure.valueOf(object);
223     }
224     return null;
225   }
226 
227   public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
228     getStateHelper().put(PropertyKeys.left, left);
229   }
230 
231   /**
232   Flag indicating this component should receive the focus.
233   <br />Default: <code>false</code>
234   */
235   public boolean isFocus() {
236     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.focus);
237     if (bool != null) {
238       return bool;
239     }
240     return false;
241   }
242 
243   public void setFocus(boolean focus) {
244     getStateHelper().put(PropertyKeys.focus, focus);
245   }
246 
247   public java.lang.Integer getColumnSpan() {
248     Number value  = (Number) getStateHelper().eval(PropertyKeys.columnSpan);
249     if (value != null) {
250       return value.intValue();
251     }
252     return 1;
253   }
254 
255   public void setColumnSpan(java.lang.Integer columnSpan) {
256     getStateHelper().put(PropertyKeys.columnSpan, columnSpan);
257   }
258 
259   /**
260   A localized user presentable label for the right select box.
261 
262   */
263   public java.lang.String getSelectedLabel() {
264     return (java.lang.String) getStateHelper().eval(PropertyKeys.selectedLabel);
265   }
266 
267   public void setSelectedLabel(java.lang.String selectedLabel) {
268     getStateHelper().put(PropertyKeys.selectedLabel, selectedLabel);
269   }
270 
271   /**
272   This value will usually be set by the layout manager.
273 
274   */
275   public org.apache.myfaces.tobago.layout.Measure getTop() {
276     Object object = getStateHelper().eval(PropertyKeys.top);
277     if (object != null) {
278        return Measure.valueOf(object);
279     }
280     return null;
281   }
282 
283   public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
284     getStateHelper().put(PropertyKeys.top, top);
285   }
286 
287   public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
288     Object object = getStateHelper().eval(PropertyKeys.maximumHeight);
289     if (object != null) {
290        return Measure.valueOf(object);
291     }
292     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this);
293   }
294 
295   public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
296     getStateHelper().put(PropertyKeys.maximumHeight, maximumHeight);
297   }
298 
299   /**
300   This value will usually be set by the layout manager. It holds the current width computed by the layout manager.
301 
302   */
303   public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
304     Object object = getStateHelper().eval(PropertyKeys.currentWidth);
305     if (object != null) {
306        return Measure.valueOf(object);
307     }
308     return getWidth();
309   }
310 
311   public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
312     getStateHelper().put(PropertyKeys.currentWidth, currentWidth);
313   }
314 
315   public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
316     Object object = getStateHelper().eval(PropertyKeys.marginTop);
317     if (object != null) {
318        return Measure.valueOf(object);
319     }
320     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this);
321   }
322 
323   public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
324     getStateHelper().put(PropertyKeys.marginTop, marginTop);
325   }
326 
327   /**
328   This value will usually be set by the layout manager.
329 
330   */
331   public org.apache.myfaces.tobago.layout.Measure getWidth() {
332     Object object = getStateHelper().eval(PropertyKeys.width);
333     if (object != null) {
334        return Measure.valueOf(object);
335     }
336     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this);
337   }
338 
339   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
340     getStateHelper().put(PropertyKeys.width, width);
341   }
342 
343   public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
344     Object object = getStateHelper().eval(PropertyKeys.marginRight);
345     if (object != null) {
346        return Measure.valueOf(object);
347     }
348     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this);
349   }
350 
351   public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
352     getStateHelper().put(PropertyKeys.marginRight, marginRight);
353   }
354 
355   /**
356   This value will usually be set by the layout manager. It holds the current height computed by the layout manager.
357 
358   */
359   public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
360     Object object = getStateHelper().eval(PropertyKeys.currentHeight);
361     if (object != null) {
362        return Measure.valueOf(object);
363     }
364     return getHeight();
365   }
366 
367   public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
368     getStateHelper().put(PropertyKeys.currentHeight, currentHeight);
369   }
370 
371   public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
372     Object object = getStateHelper().eval(PropertyKeys.preferredHeight);
373     if (object != null) {
374        return Measure.valueOf(object);
375     }
376     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this);
377   }
378 
379   public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
380     getStateHelper().put(PropertyKeys.preferredHeight, preferredHeight);
381   }
382 
383   /**
384   This attribute is for internal use only.
385 
386   */
387   public org.apache.myfaces.tobago.layout.Display getDisplay() {
388     return (org.apache.myfaces.tobago.layout.Display) getStateHelper().eval(PropertyKeys.display);
389   }
390 
391   public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
392     getStateHelper().put(PropertyKeys.display, display);
393   }
394 
395   /**
396   A localized user presentable name for this component.
397 
398   */
399   public java.lang.String getLabel() {
400     return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
401   }
402 
403   public void setLabel(java.lang.String label) {
404     getStateHelper().put(PropertyKeys.label, label);
405   }
406 
407   public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
408     Object object = getStateHelper().eval(PropertyKeys.maximumWidth);
409     if (object != null) {
410        return Measure.valueOf(object);
411     }
412     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this);
413   }
414 
415   public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
416     getStateHelper().put(PropertyKeys.maximumWidth, maximumWidth);
417   }
418 
419   /**
420   Clientside script function to add to this component's onchange handler.
421 
422   */
423   public java.lang.String getOnchange() {
424     return (java.lang.String) getStateHelper().eval(PropertyKeys.onchange);
425   }
426 
427   public void setOnchange(java.lang.String onchange) {
428     getStateHelper().put(PropertyKeys.onchange, onchange);
429   }
430 
431   public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
432     Object object = getStateHelper().eval(PropertyKeys.preferredWidth);
433     if (object != null) {
434        return Measure.valueOf(object);
435     }
436     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this);
437   }
438 
439   public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
440     getStateHelper().put(PropertyKeys.preferredWidth, preferredWidth);
441   }
442 
443   public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
444     Object object = getStateHelper().eval(PropertyKeys.marginBottom);
445     if (object != null) {
446        return Measure.valueOf(object);
447     }
448     return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this);
449   }
450 
451   public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
452     getStateHelper().put(PropertyKeys.marginBottom, marginBottom);
453   }
454 
455   /**
456   This attribute is for internal use only.
457 
458   */
459   public java.lang.Integer getVerticalIndex() {
460     Number value  = (Number) getStateHelper().eval(PropertyKeys.verticalIndex);
461     if (value != null) {
462       return value.intValue();
463     }
464     return null;
465   }
466 
467   public void setVerticalIndex(java.lang.Integer verticalIndex) {
468     getStateHelper().put(PropertyKeys.verticalIndex, verticalIndex);
469   }
470 
471   public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
472     if (currentMarkup != null) {
473       return currentMarkup;
474     }
475     return null;
476   }
477 
478   public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
479     this.currentMarkup = currentMarkup;
480   }
481 
482   /**
483   This attribute is for internal use only.
484 
485   */
486   public java.lang.Integer getHorizontalIndex() {
487     Number value  = (Number) getStateHelper().eval(PropertyKeys.horizontalIndex);
488     if (value != null) {
489       return value.intValue();
490     }
491     return null;
492   }
493 
494   public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
495     getStateHelper().put(PropertyKeys.horizontalIndex, horizontalIndex);
496   }
497 
498   /**
499   Flag indicating that this component will prohibit changes by the user.
500   <br />Default: <code>false</code>
501   */
502   public boolean isReadonly() {
503     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.readonly);
504     if (bool != null) {
505       return bool;
506     }
507     return false;
508   }
509 
510   public void setReadonly(boolean readonly) {
511     getStateHelper().put(PropertyKeys.readonly, readonly);
512   }
513 
514   /**
515   Flag indicating that this element is disabled.
516   <br />Default: <code>false</code>
517   */
518   public boolean isDisabled() {
519     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
520     if (bool != null) {
521       return bool;
522     }
523     return false;
524   }
525 
526   public void setDisabled(boolean disabled) {
527     getStateHelper().put(PropertyKeys.disabled, disabled);
528   }
529 
530   public Object saveState(FacesContext context) {
531     currentMarkup = null;
532     return super.saveState(context);
533   }
534 
535 
536 }