1 // WARNING: This file was automatically generated. Do not edit it directly,
2 // or you will lose your changes.
3
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 */
22 package org.apache.myfaces.trinidad.component.core.input;
23
24 import java.util.Arrays;
25 import java.util.Collection;
26 import java.util.Collections;
27 import java.util.List;
28 import java.util.Map;
29 import javax.faces.component.UIComponent;
30 import javax.faces.component.behavior.ClientBehavior;
31 import javax.faces.component.behavior.ClientBehaviorHolder;
32 import org.apache.myfaces.trinidad.bean.FacesBean;
33 import org.apache.myfaces.trinidad.bean.PropertyKey;
34 import org.apache.myfaces.trinidad.component.UIXSelectMany;
35 import org.apache.myfaces.trinidad.util.ComponentUtils;
36
37 /**
38 *
39 * The selectManyShuttle component provides a mechanism for selecting
40 * multiple values from a list of values by allowing the user to move
41 * items between two lists. The "value" attribute of the selectManyShuttle,
42 * like any other selectMany component, must be a List or array of values
43 * that correspond to a value of one of the contained SelectItems. If a
44 * value of one of the SelectItems is in the List or array, that item
45 * will appear in the trailing list. Looked at another way, you can
46 * change a selectManyListbox directly into a selectManyShuttle; instead
47 * of the "value" driving which items are selected in the listbox, it
48 * affects which items appear in the trailing list of the shuttle.
49 * <html:p>
50 * The selectManyShuttle does not allow for reordering;
51 * the selectOrderShuttle component adds this functionality
52 * to selectManyShuttle. selectManyShuttle also does not include
53 * automatic messaging support, unlike most other Trinidad messaging
54 * components.
55 * </html:p>
56 * <section name="Attributes">
57 * <html:p>
58 * Each list in the shuttle has a header, the
59 * text of which can be set as the "leadingHeader" attribute
60 * and the "trailingHeader" attribute.
61 * </html:p>
62 * <html:p>
63 * Each container in the shuttle can have an area to display item
64 * descriptions below the list. To indicate whether or not
65 * a container should have such an area set the attributes
66 * <html:code>"leadingDescShown"</html:code> attribute
67 * and the <html:code>"trailingDescShown"</html:code> attribute.
68 * </html:p>
69 * <html:p>
70 * To control the display size(number of items) of the lists, the
71 * size attribute has to be specified. The size specified must be
72 * between 10 and 20 items. If the attribute is not set or has a
73 * value less than 10, the size would have a default or minimum
74 * value of 10. If the attribute value specified is more than 20 items,
75 * the size would have the maximum value of 20.
76 * </html:p>
77 * </section>
78 *
79 * <section name="Shuttle Footers">
80 * <html:p>
81 * The shuttle allows the user to place components - typically,
82 * buttons or icons - below each of the lists. These
83 * buttons or icons will take up only one row below the lists
84 * (no wrapping), and should have a maximum height of 26 pixels
85 * if the layout of the shuttle is to remain consistent. The
86 * buttons and icons should be placed within the
87 * shuttle as the <html:code>leadingFooter</html:code>
88 * or the <html:code>trailingFooter</html:code> facet,
89 * depending on which list the buttons should go under.
90 * Leave the appropriate facet empty if no footer is
91 * required under a list. These buttons and icons can be
92 * used to perform operations upon the shuttle using a
93 * ShuttleProxy as described below.
94 * </html:p>
95 * </section>
96 * <section name="Shuttle Filter">
97 * <html:p>
98 * The shuttle allows the user to place a filter above the
99 * list in the leading container. The filter is added as the
100 * <html:code>filter</html:code> facet. The filter can be used to
101 * perform operations upon the shuttle using a ShuttleProxy as
102 * described below.
103 * </html:p>
104 * </section>
105 *
106 * <section name="JavaScript proxies">
107 * <html:p>
108 * In some cases, developers will need to use JavaScript to
109 * manipulate or use the contents of the lists. This may be
110 * required as actions for the buttons or icons in the
111 * shuttle footers or outside the shuttle all together. Thus,
112 * a set of Javascript utility methods are available that
113 * operate on the lists. These are located in the shuttle.js
114 * Javascript library, which is automatically loaded if you
115 * use the shuttle.
116 * </html:p>
117 * <html:p>
118 * These methods can be accessed by creating a
119 * <html:code>ShuttleProxy</html:code> instance based on the
120 * shuttle client ID and form.
121 * <html:pre>
122 * // create the proxy object
123 * var proxy2 = new ShuttleProxy("testShuttle2", "testForm2");
124 * </html:pre>
125 * </html:p>
126 * <html:p>
127 * Once the proxy is created, you can use it to gain
128 * information about the lists or to manipulate the lists in
129 * the shuttle. The proxy provides the following functions:
130 *
131 * <html:ul>
132 *
133 * <html:li><html:code>move(fromLeadingList, allItems)</html:code> : moves items from
134 * one list to the other. If <html:code>fromLeadingList</html:code> is true, the items
135 * move from the leading list to the trailing list. If
136 * <html:code>fromLeadingList</html:code> is false, the items move the opposite
137 * direction. If <html:code>allItems</html:code> is true, all the items are moved,
138 * otherwise only the selected items are moved.</html:li>
139 *
140 * <html:li><html:code>reorderList(down, allTheWay, leadingList)</html:code> : reorders
141 * a list. If <html:code>down</html:code> is true, the items move down in the list,
142 * otherwise they move up. If <html:code>allTheWay</html:code> is true, the items move
143 * all the way to the top or bottom of the list depending on the value of
144 * <html:code>down</html:code>. If <html:code>leadingList</html:code> is true, the leading list
145 * is reordered, otherwise the trailing list is reordered.</html:li>
146 *
147 * <html:li><html:code>getItems(leadingList)</html:code> : returns an array of
148 * <html:code>option</html:code> objects that make up a list. If <html:code>leadingList</html:code>
149 * is true, the array has the leading list's options, otherwise the items
150 * are from the trailing list. Note that the array will not include the
151 * horizontal bar at the end of the lists.</html:li>
152 *
153 * <html:li><html:code>getSelectedItems(leadingList)</html:code> : returns an array of
154 * <html:code>option</html:code> objects that are selected in a list. If
155 * <html:code>leadingList</html:code> is true, the array has the leading list's options,
156 * otherwise the items are from the trailingList. Note that the array will not
157 * include the horizontal bar at the end of the lists.</html:li>
158 *
159 * <html:li><html:code>getItemCount(leadingList)</html:code> : returns the number of
160 * items in a list. If <html:code>leadingList</html:code> is true, the number returned
161 * is the number of items in the leading list. Otherwise, the number returned
162 * is the number of items in the trailing list. Note that the horizontal bar
163 * at the end of the lists is not included in this count -- you only get the
164 * number of actual items.</html:li>
165 *
166 * <html:li><html:code>getSelectedItemCount(leadingList)</html:code> : returns the number
167 * of selected items in a list. If <html:code>leadingList</html:code> is true, the
168 * number returned is the number of selected items in the leading list.
169 * Otherwise, the number returned is the number of selected items in the
170 * trailing list. Note that the horizontal bar at the end of the lists is not
171 * included in this count -- you only get the number of actual items.</html:li>
172 *
173 * <html:li><html:code>addItem(leadingList, index, text, value, description)</html:code> : adds an item
174 * at the given index to a list. The item is added to the leading list if
175 * <html:code>leadingList</html:code> is true, otherwise it is added to the trailing list.
176 * The <html:code>index</html:code> should be 0 based. Thus, to insert an item at
177 * the end of a list, set <html:code>index</html:code> to
178 * <html:code>shuttleProxy.getItemCount(leadinglist)</html:code>. The <html:code>text</html:code>
179 * parameter specifies the display text for the item, while the
180 * <html:code>value</html:code> parameter specifies the value that represents this item
181 * upon form submission. The <html:code>description</html:code> parameter specifies a
182 * description of the item. The <html:code>description</html:code> parameter can be omitted.</html:li>
183 *
184 * <html:li><html:code>deleteItemByValue(leadingList, value)</html:code> :
185 * deletes an item
186 * from a list. The item is deleted from the leading list if
187 * <html:code>leadingList</html:code> is true, otherwise it is deleted from the trailing
188 * list. The item deleted is the first item with the value (not text) of
189 * <html:code>value</html:code>.</html:li>
190 *
191 * <html:li><html:code>deleteSelectedItems(leadingList)</html:code> : deletes items
192 * from a list. The items are deleted from the leading list if
193 * <html:code>leadingList</html:code> is true, otherwise they are deleted from the
194 * trailing list. The items deleted are the items that are selected in the
195 * appropriate list.</html:li>
196 *
197 * <html:li><html:code>reset()</html:code> : reset the shuttle
198 * to its initial state.</html:li>
199 *
200 * </html:ul>
201 *
202 * </html:p>
203 *
204 * </section>
205 *
206 * <h4>Events:</h4>
207 * <table border="1" width="100%" cellpadding="3" summary="">
208 * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
209 * <th align="left">Type</th>
210 * <th align="left">Phases</th>
211 * <th align="left">Description</th>
212 * </tr>
213 * <tr class="TableRowColor">
214 * <td valign="top"><code>javax.faces.event.ValueChangeEvent</code></td>
215 * <td valign="top" nowrap>Process<br>Validations<br>Apply<br>Request<br>Values</td>
216 * <td valign="top">The valueChange event is delivered when the value
217 attribute is changed.</td>
218 * </tr>
219 * <tr class="TableRowColor">
220 * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
221 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
222 * <td valign="top">Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.</td>
223 * </tr>
224 * </table>
225 */
226 public class CoreSelectManyShuttle extends UIXSelectMany
227 implements ClientBehaviorHolder
228 {
229 static public final FacesBean.Type TYPE = new FacesBean.Type(
230 UIXSelectMany.TYPE);
231 static public final PropertyKey VALUE_PASS_THRU_KEY =
232 TYPE.registerKey("valuePassThru", Boolean.class, Boolean.FALSE);
233 static public final PropertyKey READ_ONLY_KEY =
234 TYPE.registerKey("readOnly", Boolean.class, Boolean.FALSE);
235 static public final PropertyKey DISABLED_KEY =
236 TYPE.registerKey("disabled", Boolean.class, Boolean.FALSE);
237 static public final PropertyKey ONCHANGE_KEY =
238 TYPE.registerKey("onchange", String.class);
239 static public final PropertyKey INLINE_STYLE_KEY =
240 TYPE.registerKey("inlineStyle", String.class);
241 static public final PropertyKey STYLE_CLASS_KEY =
242 TYPE.registerKey("styleClass", String.class);
243 static public final PropertyKey SHORT_DESC_KEY =
244 TYPE.registerKey("shortDesc", String.class);
245 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
246 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
247 static public final PropertyKey ONCLICK_KEY =
248 TYPE.registerKey("onclick", String.class);
249 static public final PropertyKey ONDBLCLICK_KEY =
250 TYPE.registerKey("ondblclick", String.class);
251 static public final PropertyKey ONMOUSEDOWN_KEY =
252 TYPE.registerKey("onmousedown", String.class);
253 static public final PropertyKey ONMOUSEUP_KEY =
254 TYPE.registerKey("onmouseup", String.class);
255 static public final PropertyKey ONMOUSEOVER_KEY =
256 TYPE.registerKey("onmouseover", String.class);
257 static public final PropertyKey ONMOUSEMOVE_KEY =
258 TYPE.registerKey("onmousemove", String.class);
259 static public final PropertyKey ONMOUSEOUT_KEY =
260 TYPE.registerKey("onmouseout", String.class);
261 static public final PropertyKey ONKEYPRESS_KEY =
262 TYPE.registerKey("onkeypress", String.class);
263 static public final PropertyKey ONKEYDOWN_KEY =
264 TYPE.registerKey("onkeydown", String.class);
265 static public final PropertyKey ONKEYUP_KEY =
266 TYPE.registerKey("onkeyup", String.class);
267 static public final PropertyKey ONBLUR_KEY =
268 TYPE.registerKey("onblur", String.class);
269 static public final PropertyKey ONFOCUS_KEY =
270 TYPE.registerKey("onfocus", String.class);
271 static public final PropertyKey SIZE_KEY =
272 TYPE.registerKey("size", Integer.class);
273 static public final PropertyKey LEADING_HEADER_KEY =
274 TYPE.registerKey("leadingHeader", String.class);
275 static public final PropertyKey TRAILING_HEADER_KEY =
276 TYPE.registerKey("trailingHeader", String.class);
277 static public final PropertyKey LEADING_DESC_SHOWN_KEY =
278 TYPE.registerKey("leadingDescShown", Boolean.class, Boolean.FALSE);
279 static public final PropertyKey TRAILING_DESC_SHOWN_KEY =
280 TYPE.registerKey("trailingDescShown", Boolean.class, Boolean.FALSE);
281 static public final PropertyKey LABEL_KEY =
282 TYPE.registerKey("label", String.class);
283 static public final String FILTER_FACET = "filter";
284 static public final String LEADING_FOOTER_FACET = "leadingFooter";
285 static public final String TRAILING_FOOTER_FACET = "trailingFooter";
286
287 static public final String COMPONENT_FAMILY =
288 "org.apache.myfaces.trinidad.SelectMany";
289 static public final String COMPONENT_TYPE =
290 "org.apache.myfaces.trinidad.CoreSelectManyShuttle";
291 // Supported client events for client behaviors:
292 private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
293 Arrays.asList(
294 "change", "click", "dblclick", "mousedown", "mouseup", "mouseover",
295 "mousemove", "mouseout", "keypress", "keydown", "keyup", "focus",
296 "blur", "valueChange"
297 ));
298
299 /**
300 * Construct an instance of the CoreSelectManyShuttle.
301 */
302 public CoreSelectManyShuttle()
303 {
304 super("org.apache.myfaces.trinidad.Shuttle");
305 }
306
307 /**
308 * the filter above the leading list.
309 */
310 final public UIComponent getFilter()
311 {
312 return getFacet(FILTER_FACET);
313 }
314
315 /**
316 * the filter above the leading list.
317 */
318 @SuppressWarnings("unchecked")
319 final public void setFilter(UIComponent filterFacet)
320 {
321 getFacets().put(FILTER_FACET, filterFacet);
322 }
323
324 /**
325 * the footer of buttons/images under the leading list.
326 */
327 final public UIComponent getLeadingFooter()
328 {
329 return getFacet(LEADING_FOOTER_FACET);
330 }
331
332 /**
333 * the footer of buttons/images under the leading list.
334 */
335 @SuppressWarnings("unchecked")
336 final public void setLeadingFooter(UIComponent leadingFooterFacet)
337 {
338 getFacets().put(LEADING_FOOTER_FACET, leadingFooterFacet);
339 }
340
341 /**
342 * the footer of buttons/images under the trailing list.
343 */
344 final public UIComponent getTrailingFooter()
345 {
346 return getFacet(TRAILING_FOOTER_FACET);
347 }
348
349 /**
350 * the footer of buttons/images under the trailing list.
351 */
352 @SuppressWarnings("unchecked")
353 final public void setTrailingFooter(UIComponent trailingFooterFacet)
354 {
355 getFacets().put(TRAILING_FOOTER_FACET, trailingFooterFacet);
356 }
357
358 /**
359 * Gets whether or not the values are passed through to
360 * the client. When valuePassThru is false
361 * the value and the options' values
362 * are converted to indexes before being sent to the client.
363 * Therefore, when valuePassThru is false,
364 * there is no need to write your own converter when you are using custom Objects
365 * as your values and/or options.
366 * If you need to know the actual values on the client-side, then you can set
367 * valuePassThru to true. This will pass the values through to the client,
368 * using your custom converter if it is available; a custom converter is
369 * needed if you are using custom objects. The default is false.
370 *
371 * @return the new valuePassThru value
372 */
373 final public boolean isValuePassThru()
374 {
375 return ComponentUtils.resolveBoolean(getProperty(VALUE_PASS_THRU_KEY), false);
376 }
377
378 /**
379 * Sets whether or not the values are passed through to
380 * the client. When valuePassThru is false
381 * the value and the options' values
382 * are converted to indexes before being sent to the client.
383 * Therefore, when valuePassThru is false,
384 * there is no need to write your own converter when you are using custom Objects
385 * as your values and/or options.
386 * If you need to know the actual values on the client-side, then you can set
387 * valuePassThru to true. This will pass the values through to the client,
388 * using your custom converter if it is available; a custom converter is
389 * needed if you are using custom objects. The default is false.
390 *
391 * @param valuePassThru the new valuePassThru value
392 */
393 final public void setValuePassThru(boolean valuePassThru)
394 {
395 setProperty(VALUE_PASS_THRU_KEY, valuePassThru ? Boolean.TRUE : Boolean.FALSE);
396 }
397
398 /**
399 * Gets whether the element is read-only.
400 *
401 * @return the new readOnly value
402 */
403 final public boolean isReadOnly()
404 {
405 return ComponentUtils.resolveBoolean(getProperty(READ_ONLY_KEY), false);
406 }
407
408 /**
409 * Sets whether the element is read-only.
410 *
411 * @param readOnly the new readOnly value
412 */
413 final public void setReadOnly(boolean readOnly)
414 {
415 setProperty(READ_ONLY_KEY, readOnly ? Boolean.TRUE : Boolean.FALSE);
416 }
417
418 /**
419 * Gets whether the element is disabled.
420 *
421 * @return the new disabled value
422 */
423 final public boolean isDisabled()
424 {
425 return ComponentUtils.resolveBoolean(getProperty(DISABLED_KEY), false);
426 }
427
428 /**
429 * Sets whether the element is disabled.
430 *
431 * @param disabled the new disabled value
432 */
433 final public void setDisabled(boolean disabled)
434 {
435 setProperty(DISABLED_KEY, disabled ? Boolean.TRUE : Boolean.FALSE);
436 }
437
438 /**
439 * Gets event handler for when the value is changed.
440 *
441 * @return the new onchange value
442 */
443 final public String getOnchange()
444 {
445 return ComponentUtils.resolveString(getProperty(ONCHANGE_KEY));
446 }
447
448 /**
449 * Sets event handler for when the value is changed.
450 *
451 * @param onchange the new onchange value
452 */
453 final public void setOnchange(String onchange)
454 {
455 setProperty(ONCHANGE_KEY, (onchange));
456 }
457
458 /**
459 * Gets the CSS styles to use for this component.
460 *
461 * @return the new inlineStyle value
462 */
463 final public String getInlineStyle()
464 {
465 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
466 }
467
468 /**
469 * Sets the CSS styles to use for this component.
470 *
471 * @param inlineStyle the new inlineStyle value
472 */
473 final public void setInlineStyle(String inlineStyle)
474 {
475 setProperty(INLINE_STYLE_KEY, (inlineStyle));
476 }
477
478 /**
479 * Gets a CSS style class to use for this component.
480 *
481 * @return the new styleClass value
482 */
483 final public String getStyleClass()
484 {
485 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
486 }
487
488 /**
489 * Sets a CSS style class to use for this component.
490 *
491 * @param styleClass the new styleClass value
492 */
493 final public void setStyleClass(String styleClass)
494 {
495 setProperty(STYLE_CLASS_KEY, (styleClass));
496 }
497
498 /**
499 * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
500 *
501 * @return the new shortDesc value
502 */
503 final public String getShortDesc()
504 {
505 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
506 }
507
508 /**
509 * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
510 *
511 * @param shortDesc the new shortDesc value
512 */
513 final public void setShortDesc(String shortDesc)
514 {
515 setProperty(SHORT_DESC_KEY, (shortDesc));
516 }
517
518 /**
519 * Gets the IDs of the components that should trigger a partial update.
520 * <p>
521 * This component will listen on the trigger components. If one of the
522 * trigger components receives an event that will cause it to update
523 * in some way, this component will request to be updated too.</p>
524 * <p>
525 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
526 * </p>
527 * <p>
528 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
529 * or use multiple colons to move up through the NamingContainer. For example,
530 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
531 * ":::" will pop out of two naming containers, etc. The search for
532 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
533 * component with id = commandButton1 after popping out of two naming containers relative to this component.
534 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
535 *
536 * @return the new partialTriggers value
537 */
538 final public String[] getPartialTriggers()
539 {
540 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
541 }
542
543 /**
544 * Sets the IDs of the components that should trigger a partial update.
545 * <p>
546 * This component will listen on the trigger components. If one of the
547 * trigger components receives an event that will cause it to update
548 * in some way, this component will request to be updated too.</p>
549 * <p>
550 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
551 * </p>
552 * <p>
553 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
554 * or use multiple colons to move up through the NamingContainer. For example,
555 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
556 * ":::" will pop out of two naming containers, etc. The search for
557 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
558 * component with id = commandButton1 after popping out of two naming containers relative to this component.
559 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
560 *
561 * @param partialTriggers the new partialTriggers value
562 */
563 final public void setPartialTriggers(String[] partialTriggers)
564 {
565 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
566 }
567
568 /**
569 * Gets an onclick Javascript handler.
570 *
571 * @return the new onclick value
572 */
573 final public String getOnclick()
574 {
575 return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
576 }
577
578 /**
579 * Sets an onclick Javascript handler.
580 *
581 * @param onclick the new onclick value
582 */
583 final public void setOnclick(String onclick)
584 {
585 setProperty(ONCLICK_KEY, (onclick));
586 }
587
588 /**
589 * Gets an ondblclick Javascript handler.
590 *
591 * @return the new ondblclick value
592 */
593 final public String getOndblclick()
594 {
595 return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
596 }
597
598 /**
599 * Sets an ondblclick Javascript handler.
600 *
601 * @param ondblclick the new ondblclick value
602 */
603 final public void setOndblclick(String ondblclick)
604 {
605 setProperty(ONDBLCLICK_KEY, (ondblclick));
606 }
607
608 /**
609 * Gets an onmousedown Javascript handler.
610 *
611 * @return the new onmousedown value
612 */
613 final public String getOnmousedown()
614 {
615 return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
616 }
617
618 /**
619 * Sets an onmousedown Javascript handler.
620 *
621 * @param onmousedown the new onmousedown value
622 */
623 final public void setOnmousedown(String onmousedown)
624 {
625 setProperty(ONMOUSEDOWN_KEY, (onmousedown));
626 }
627
628 /**
629 * Gets an onmouseup Javascript handler.
630 *
631 * @return the new onmouseup value
632 */
633 final public String getOnmouseup()
634 {
635 return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
636 }
637
638 /**
639 * Sets an onmouseup Javascript handler.
640 *
641 * @param onmouseup the new onmouseup value
642 */
643 final public void setOnmouseup(String onmouseup)
644 {
645 setProperty(ONMOUSEUP_KEY, (onmouseup));
646 }
647
648 /**
649 * Gets an onmouseover Javascript handler.
650 *
651 * @return the new onmouseover value
652 */
653 final public String getOnmouseover()
654 {
655 return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
656 }
657
658 /**
659 * Sets an onmouseover Javascript handler.
660 *
661 * @param onmouseover the new onmouseover value
662 */
663 final public void setOnmouseover(String onmouseover)
664 {
665 setProperty(ONMOUSEOVER_KEY, (onmouseover));
666 }
667
668 /**
669 * Gets an onmousemove Javascript handler.
670 *
671 * @return the new onmousemove value
672 */
673 final public String getOnmousemove()
674 {
675 return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
676 }
677
678 /**
679 * Sets an onmousemove Javascript handler.
680 *
681 * @param onmousemove the new onmousemove value
682 */
683 final public void setOnmousemove(String onmousemove)
684 {
685 setProperty(ONMOUSEMOVE_KEY, (onmousemove));
686 }
687
688 /**
689 * Gets an onmouseout Javascript handler.
690 *
691 * @return the new onmouseout value
692 */
693 final public String getOnmouseout()
694 {
695 return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
696 }
697
698 /**
699 * Sets an onmouseout Javascript handler.
700 *
701 * @param onmouseout the new onmouseout value
702 */
703 final public void setOnmouseout(String onmouseout)
704 {
705 setProperty(ONMOUSEOUT_KEY, (onmouseout));
706 }
707
708 /**
709 * Gets an onkeypress Javascript handler.
710 *
711 * @return the new onkeypress value
712 */
713 final public String getOnkeypress()
714 {
715 return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
716 }
717
718 /**
719 * Sets an onkeypress Javascript handler.
720 *
721 * @param onkeypress the new onkeypress value
722 */
723 final public void setOnkeypress(String onkeypress)
724 {
725 setProperty(ONKEYPRESS_KEY, (onkeypress));
726 }
727
728 /**
729 * Gets an onkeydown Javascript handler.
730 *
731 * @return the new onkeydown value
732 */
733 final public String getOnkeydown()
734 {
735 return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
736 }
737
738 /**
739 * Sets an onkeydown Javascript handler.
740 *
741 * @param onkeydown the new onkeydown value
742 */
743 final public void setOnkeydown(String onkeydown)
744 {
745 setProperty(ONKEYDOWN_KEY, (onkeydown));
746 }
747
748 /**
749 * Gets an onkeyup Javascript handler.
750 *
751 * @return the new onkeyup value
752 */
753 final public String getOnkeyup()
754 {
755 return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
756 }
757
758 /**
759 * Sets an onkeyup Javascript handler.
760 *
761 * @param onkeyup the new onkeyup value
762 */
763 final public void setOnkeyup(String onkeyup)
764 {
765 setProperty(ONKEYUP_KEY, (onkeyup));
766 }
767
768 /**
769 * Gets the event handler for the component losing the focus.
770 *
771 * @return the new onblur value
772 */
773 final public String getOnblur()
774 {
775 return ComponentUtils.resolveString(getProperty(ONBLUR_KEY));
776 }
777
778 /**
779 * Sets the event handler for the component losing the focus.
780 *
781 * @param onblur the new onblur value
782 */
783 final public void setOnblur(String onblur)
784 {
785 setProperty(ONBLUR_KEY, (onblur));
786 }
787
788 /**
789 * Gets the event handler for the component gaining the focus.
790 *
791 * @return the new onfocus value
792 */
793 final public String getOnfocus()
794 {
795 return ComponentUtils.resolveString(getProperty(ONFOCUS_KEY));
796 }
797
798 /**
799 * Sets the event handler for the component gaining the focus.
800 *
801 * @param onfocus the new onfocus value
802 */
803 final public void setOnfocus(String onfocus)
804 {
805 setProperty(ONFOCUS_KEY, (onfocus));
806 }
807
808 /**
809 * Gets the display size(number of items) of the lists. The size
810 * specified must be between 10 and 20 items. If the attribute is not
811 * set or has a value less than 10, the size would have a default or
812 * minimum value of 10. If the attribute value specified is more than
813 * 20 items, the size would have the maximum value of 20.
814 *
815 * @return the new size value
816 */
817 final public int getSize()
818 {
819 return ComponentUtils.resolveInteger(getProperty(SIZE_KEY));
820 }
821
822 /**
823 * Sets the display size(number of items) of the lists. The size
824 * specified must be between 10 and 20 items. If the attribute is not
825 * set or has a value less than 10, the size would have a default or
826 * minimum value of 10. If the attribute value specified is more than
827 * 20 items, the size would have the maximum value of 20.
828 *
829 * @param size the new size value
830 */
831 final public void setSize(int size)
832 {
833 setProperty(SIZE_KEY, Integer.valueOf(size));
834 }
835
836 /**
837 * Gets the header of the leading list of the shuttle.
838 *
839 * @return the new leadingHeader value
840 */
841 final public String getLeadingHeader()
842 {
843 return ComponentUtils.resolveString(getProperty(LEADING_HEADER_KEY));
844 }
845
846 /**
847 * Sets the header of the leading list of the shuttle.
848 *
849 * @param leadingHeader the new leadingHeader value
850 */
851 final public void setLeadingHeader(String leadingHeader)
852 {
853 setProperty(LEADING_HEADER_KEY, (leadingHeader));
854 }
855
856 /**
857 * Gets the header of the trailing list of the shuttle.
858 *
859 * @return the new trailingHeader value
860 */
861 final public String getTrailingHeader()
862 {
863 return ComponentUtils.resolveString(getProperty(TRAILING_HEADER_KEY));
864 }
865
866 /**
867 * Sets the header of the trailing list of the shuttle.
868 *
869 * @param trailingHeader the new trailingHeader value
870 */
871 final public void setTrailingHeader(String trailingHeader)
872 {
873 setProperty(TRAILING_HEADER_KEY, (trailingHeader));
874 }
875
876 /**
877 * Gets whether or not the leading list has an area to display descriptions.
878 *
879 * @return the new leadingDescShown value
880 */
881 final public boolean isLeadingDescShown()
882 {
883 return ComponentUtils.resolveBoolean(getProperty(LEADING_DESC_SHOWN_KEY), false);
884 }
885
886 /**
887 * Sets whether or not the leading list has an area to display descriptions.
888 *
889 * @param leadingDescShown the new leadingDescShown value
890 */
891 final public void setLeadingDescShown(boolean leadingDescShown)
892 {
893 setProperty(LEADING_DESC_SHOWN_KEY, leadingDescShown ? Boolean.TRUE : Boolean.FALSE);
894 }
895
896 /**
897 * Gets whether or not the trailing list has an area to display descriptions.
898 *
899 * @return the new trailingDescShown value
900 */
901 final public boolean isTrailingDescShown()
902 {
903 return ComponentUtils.resolveBoolean(getProperty(TRAILING_DESC_SHOWN_KEY), false);
904 }
905
906 /**
907 * Sets whether or not the trailing list has an area to display descriptions.
908 *
909 * @param trailingDescShown the new trailingDescShown value
910 */
911 final public void setTrailingDescShown(boolean trailingDescShown)
912 {
913 setProperty(TRAILING_DESC_SHOWN_KEY, trailingDescShown ? Boolean.TRUE : Boolean.FALSE);
914 }
915
916 /**
917 * Gets the label for the shuttle that is used to identify the component only when displaying error messages. The label specified does not otherwise appear on the page.
918 *
919 * @return the new label value
920 */
921 final public String getLabel()
922 {
923 return ComponentUtils.resolveString(getProperty(LABEL_KEY));
924 }
925
926 /**
927 * Sets the label for the shuttle that is used to identify the component only when displaying error messages. The label specified does not otherwise appear on the page.
928 *
929 * @param label the new label value
930 */
931 final public void setLabel(String label)
932 {
933 setProperty(LABEL_KEY, (label));
934 }
935
936 @Override
937 public String getDefaultEventName()
938 {
939 return "change";
940 }
941
942 @Override
943 public Collection<String> getEventNames()
944 {
945 return _EVENT_NAMES;
946 }
947
948 @Override
949 public Map<String, List<ClientBehavior>> getClientBehaviors()
950 {
951 return super.getClientBehaviors();
952 }
953
954 @Override
955 public void addClientBehavior(
956 String eventName,
957 ClientBehavior behavior)
958 {
959 super.addClientBehavior(eventName, behavior);
960 }
961
962 @Override
963 public String getFamily()
964 {
965 return COMPONENT_FAMILY;
966 }
967
968 @Override
969 protected FacesBean.Type getBeanType()
970 {
971 return TYPE;
972 }
973
974 /**
975 * Construct an instance of the CoreSelectManyShuttle.
976 */
977 protected CoreSelectManyShuttle(
978 String rendererType
979 )
980 {
981 super(rendererType);
982 }
983
984 static
985 {
986 TYPE.lockAndRegister("org.apache.myfaces.trinidad.SelectMany","org.apache.myfaces.trinidad.Shuttle");
987 }
988 }