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 * <html><p>The selectManyCheckbox component creates a component which allows
40 * the user to select many values from a series of checkboxes.
41 * It can contain any number of
42 * <f:selectItem>, <f:selectItems>, or
43 * <tr:selectItem> components, each of which represents an available checkbox that the user may select.</p></html>
44 *
45 * <h4>Events:</h4>
46 * <table border="1" width="100%" cellpadding="3" summary="">
47 * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
48 * <th align="left">Type</th>
49 * <th align="left">Phases</th>
50 * <th align="left">Description</th>
51 * </tr>
52 * <tr class="TableRowColor">
53 * <td valign="top"><code>javax.faces.event.ValueChangeEvent</code></td>
54 * <td valign="top" nowrap>Process<br>Validations<br>Apply<br>Request<br>Values</td>
55 * <td valign="top">The valueChange event is delivered when the value
56 attribute is changed.</td>
57 * </tr>
58 * <tr class="TableRowColor">
59 * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
60 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
61 * <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>
62 * </tr>
63 * </table>
64 */
65 public class CoreSelectManyCheckbox extends UIXSelectMany
66 implements ClientBehaviorHolder
67 {
68 static public final String LAYOUT_HORIZONTAL = "horizontal";
69 static public final String LAYOUT_VERTICAL = "vertical";
70 static public final FacesBean.Type TYPE = new FacesBean.Type(
71 UIXSelectMany.TYPE);
72 static public final PropertyKey CONTENT_STYLE_KEY =
73 TYPE.registerKey("contentStyle", String.class);
74 static public final PropertyKey LAYOUT_KEY =
75 TYPE.registerKey("layout", String.class, "vertical");
76 static public final PropertyKey VALUE_PASS_THRU_KEY =
77 TYPE.registerKey("valuePassThru", Boolean.class, Boolean.FALSE);
78 static public final PropertyKey READ_ONLY_KEY =
79 TYPE.registerKey("readOnly", Boolean.class, Boolean.FALSE);
80 static public final PropertyKey DISABLED_KEY =
81 TYPE.registerKey("disabled", Boolean.class, Boolean.FALSE);
82 static public final PropertyKey LABEL_KEY =
83 TYPE.registerKey("label", String.class);
84 static public final PropertyKey SIMPLE_KEY =
85 TYPE.registerKey("simple", Boolean.class, Boolean.FALSE);
86 static public final PropertyKey ONCHANGE_KEY =
87 TYPE.registerKey("onchange", String.class);
88 static public final PropertyKey INLINE_STYLE_KEY =
89 TYPE.registerKey("inlineStyle", String.class);
90 static public final PropertyKey STYLE_CLASS_KEY =
91 TYPE.registerKey("styleClass", String.class);
92 static public final PropertyKey SHORT_DESC_KEY =
93 TYPE.registerKey("shortDesc", String.class);
94 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
95 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
96 static public final PropertyKey ONCLICK_KEY =
97 TYPE.registerKey("onclick", String.class);
98 static public final PropertyKey ONDBLCLICK_KEY =
99 TYPE.registerKey("ondblclick", String.class);
100 static public final PropertyKey ONMOUSEDOWN_KEY =
101 TYPE.registerKey("onmousedown", String.class);
102 static public final PropertyKey ONMOUSEUP_KEY =
103 TYPE.registerKey("onmouseup", String.class);
104 static public final PropertyKey ONMOUSEOVER_KEY =
105 TYPE.registerKey("onmouseover", String.class);
106 static public final PropertyKey ONMOUSEMOVE_KEY =
107 TYPE.registerKey("onmousemove", String.class);
108 static public final PropertyKey ONMOUSEOUT_KEY =
109 TYPE.registerKey("onmouseout", String.class);
110 static public final PropertyKey ONKEYPRESS_KEY =
111 TYPE.registerKey("onkeypress", String.class);
112 static public final PropertyKey ONKEYDOWN_KEY =
113 TYPE.registerKey("onkeydown", String.class);
114 static public final PropertyKey ONKEYUP_KEY =
115 TYPE.registerKey("onkeyup", String.class);
116 static public final PropertyKey ONBLUR_KEY =
117 TYPE.registerKey("onblur", String.class);
118 static public final PropertyKey ONFOCUS_KEY =
119 TYPE.registerKey("onfocus", String.class);
120 static public final PropertyKey SHOW_REQUIRED_KEY =
121 TYPE.registerKey("showRequired", Boolean.class, Boolean.FALSE);
122 static public final PropertyKey ACCESS_KEY_KEY =
123 TYPE.registerKey("accessKey", Character.class);
124 static public final PropertyKey AUTO_SUBMIT_KEY =
125 TYPE.registerKey("autoSubmit", Boolean.class, Boolean.FALSE);
126 static public final String HELP_FACET = "help";
127
128 static public final String COMPONENT_FAMILY =
129 "org.apache.myfaces.trinidad.SelectMany";
130 static public final String COMPONENT_TYPE =
131 "org.apache.myfaces.trinidad.CoreSelectManyCheckbox";
132 // Supported client events for client behaviors:
133 private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
134 Arrays.asList(
135 "change", "click", "dblclick", "mousedown", "mouseup", "mouseover",
136 "mousemove", "mouseout", "keypress", "keydown", "keyup", "focus",
137 "blur", "valueChange"
138 ));
139
140 /**
141 * Construct an instance of the CoreSelectManyCheckbox.
142 */
143 public CoreSelectManyCheckbox()
144 {
145 super("org.apache.myfaces.trinidad.Checkbox");
146 }
147
148 /**
149 * This facet should contain field level help.
150 */
151 final public UIComponent getHelp()
152 {
153 return getFacet(HELP_FACET);
154 }
155
156 /**
157 * This facet should contain field level help.
158 */
159 @SuppressWarnings("unchecked")
160 final public void setHelp(UIComponent helpFacet)
161 {
162 getFacets().put(HELP_FACET, helpFacet);
163 }
164
165 /**
166 * Gets the CSS styles to attach to the content of the component. For example, you can set the width of that portion to 100 pixels by setting this attribute to "width: 100px".
167 *
168 * @return the new contentStyle value
169 */
170 final public String getContentStyle()
171 {
172 return ComponentUtils.resolveString(getProperty(CONTENT_STYLE_KEY));
173 }
174
175 /**
176 * Sets the CSS styles to attach to the content of the component. For example, you can set the width of that portion to 100 pixels by setting this attribute to "width: 100px".
177 *
178 * @param contentStyle the new contentStyle value
179 */
180 final public void setContentStyle(String contentStyle)
181 {
182 setProperty(CONTENT_STYLE_KEY, (contentStyle));
183 }
184
185 /**
186 * Gets whether the control displays the buttons
187 * horizontally or vertically.The valid values are "horizontal" and
188 * "vertical",the default being "vertical".
189 *
190 * @return the new layout value
191 */
192 final public String getLayout()
193 {
194 return ComponentUtils.resolveString(getProperty(LAYOUT_KEY), "vertical");
195 }
196
197 /**
198 * Sets whether the control displays the buttons
199 * horizontally or vertically.The valid values are "horizontal" and
200 * "vertical",the default being "vertical".
201 *
202 * @param layout the new layout value
203 */
204 final public void setLayout(String layout)
205 {
206 setProperty(LAYOUT_KEY, (layout));
207 }
208
209 /**
210 * Gets whether or not the values are passed through to
211 * the client. When valuePassThru is false
212 * the value and the options' values
213 * are converted to indexes before being sent to the client.
214 * Therefore, when valuePassThru is false,
215 * there is no need to write your own converter when you are using custom Objects
216 * as your values and/or options.
217 * If you need to know the actual values on the client-side, then you can set
218 * valuePassThru to true. This will pass the values through to the client,
219 * using your custom converter if it is available; a custom converter is
220 * needed if you are using custom objects. The default is false.
221 *
222 * @return the new valuePassThru value
223 */
224 final public boolean isValuePassThru()
225 {
226 return ComponentUtils.resolveBoolean(getProperty(VALUE_PASS_THRU_KEY), false);
227 }
228
229 /**
230 * Sets whether or not the values are passed through to
231 * the client. When valuePassThru is false
232 * the value and the options' values
233 * are converted to indexes before being sent to the client.
234 * Therefore, when valuePassThru is false,
235 * there is no need to write your own converter when you are using custom Objects
236 * as your values and/or options.
237 * If you need to know the actual values on the client-side, then you can set
238 * valuePassThru to true. This will pass the values through to the client,
239 * using your custom converter if it is available; a custom converter is
240 * needed if you are using custom objects. The default is false.
241 *
242 * @param valuePassThru the new valuePassThru value
243 */
244 final public void setValuePassThru(boolean valuePassThru)
245 {
246 setProperty(VALUE_PASS_THRU_KEY, valuePassThru ? Boolean.TRUE : Boolean.FALSE);
247 }
248
249 /**
250 * Gets whether the element is read-only.
251 *
252 * @return the new readOnly value
253 */
254 final public boolean isReadOnly()
255 {
256 return ComponentUtils.resolveBoolean(getProperty(READ_ONLY_KEY), false);
257 }
258
259 /**
260 * Sets whether the element is read-only.
261 *
262 * @param readOnly the new readOnly value
263 */
264 final public void setReadOnly(boolean readOnly)
265 {
266 setProperty(READ_ONLY_KEY, readOnly ? Boolean.TRUE : Boolean.FALSE);
267 }
268
269 /**
270 * Gets whether the element is disabled.
271 *
272 * @return the new disabled value
273 */
274 final public boolean isDisabled()
275 {
276 return ComponentUtils.resolveBoolean(getProperty(DISABLED_KEY), false);
277 }
278
279 /**
280 * Sets whether the element is disabled.
281 *
282 * @param disabled the new disabled value
283 */
284 final public void setDisabled(boolean disabled)
285 {
286 setProperty(DISABLED_KEY, disabled ? Boolean.TRUE : Boolean.FALSE);
287 }
288
289 /**
290 * Gets the label of the bean.
291 *
292 * @return the new label value
293 */
294 final public String getLabel()
295 {
296 return ComponentUtils.resolveString(getProperty(LABEL_KEY));
297 }
298
299 /**
300 * Sets the label of the bean.
301 *
302 * @param label the new label value
303 */
304 final public void setLabel(String label)
305 {
306 setProperty(LABEL_KEY, (label));
307 }
308
309 /**
310 * Gets a boolean value that controls whether the component
311 * provides label and message support; when set to "true", the component will
312 * not display messaging support or the label (these attributes may be ignored: label,
313 * labelAndAccessKey, accessKey, showRequired,
314 * tip), and may use simpler layout primitives
315 *
316 * @return the new simple value
317 */
318 final public boolean isSimple()
319 {
320 return ComponentUtils.resolveBoolean(getProperty(SIMPLE_KEY), false);
321 }
322
323 /**
324 * Sets a boolean value that controls whether the component
325 * provides label and message support; when set to "true", the component will
326 * not display messaging support or the label (these attributes may be ignored: label,
327 * labelAndAccessKey, accessKey, showRequired,
328 * tip), and may use simpler layout primitives
329 *
330 * @param simple the new simple value
331 */
332 final public void setSimple(boolean simple)
333 {
334 setProperty(SIMPLE_KEY, simple ? Boolean.TRUE : Boolean.FALSE);
335 }
336
337 /**
338 * Gets event handler for when the value is changed.
339 *
340 * @return the new onchange value
341 */
342 final public String getOnchange()
343 {
344 return ComponentUtils.resolveString(getProperty(ONCHANGE_KEY));
345 }
346
347 /**
348 * Sets event handler for when the value is changed.
349 *
350 * @param onchange the new onchange value
351 */
352 final public void setOnchange(String onchange)
353 {
354 setProperty(ONCHANGE_KEY, (onchange));
355 }
356
357 /**
358 * Gets the CSS styles to use for this component.
359 *
360 * @return the new inlineStyle value
361 */
362 final public String getInlineStyle()
363 {
364 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
365 }
366
367 /**
368 * Sets the CSS styles to use for this component.
369 *
370 * @param inlineStyle the new inlineStyle value
371 */
372 final public void setInlineStyle(String inlineStyle)
373 {
374 setProperty(INLINE_STYLE_KEY, (inlineStyle));
375 }
376
377 /**
378 * Gets a CSS style class to use for this component.
379 *
380 * @return the new styleClass value
381 */
382 final public String getStyleClass()
383 {
384 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
385 }
386
387 /**
388 * Sets a CSS style class to use for this component.
389 *
390 * @param styleClass the new styleClass value
391 */
392 final public void setStyleClass(String styleClass)
393 {
394 setProperty(STYLE_CLASS_KEY, (styleClass));
395 }
396
397 /**
398 * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
399 *
400 * @return the new shortDesc value
401 */
402 final public String getShortDesc()
403 {
404 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
405 }
406
407 /**
408 * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
409 *
410 * @param shortDesc the new shortDesc value
411 */
412 final public void setShortDesc(String shortDesc)
413 {
414 setProperty(SHORT_DESC_KEY, (shortDesc));
415 }
416
417 /**
418 * Gets the IDs of the components that should trigger a partial update.
419 * <p>
420 * This component will listen on the trigger components. If one of the
421 * trigger components receives an event that will cause it to update
422 * in some way, this component will request to be updated too.</p>
423 * <p>
424 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
425 * </p>
426 * <p>
427 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
428 * or use multiple colons to move up through the NamingContainer. For example,
429 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
430 * ":::" will pop out of two naming containers, etc. The search for
431 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
432 * component with id = commandButton1 after popping out of two naming containers relative to this component.
433 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
434 *
435 * @return the new partialTriggers value
436 */
437 final public String[] getPartialTriggers()
438 {
439 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
440 }
441
442 /**
443 * Sets the IDs of the components that should trigger a partial update.
444 * <p>
445 * This component will listen on the trigger components. If one of the
446 * trigger components receives an event that will cause it to update
447 * in some way, this component will request to be updated too.</p>
448 * <p>
449 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
450 * </p>
451 * <p>
452 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
453 * or use multiple colons to move up through the NamingContainer. For example,
454 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
455 * ":::" will pop out of two naming containers, etc. The search for
456 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
457 * component with id = commandButton1 after popping out of two naming containers relative to this component.
458 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
459 *
460 * @param partialTriggers the new partialTriggers value
461 */
462 final public void setPartialTriggers(String[] partialTriggers)
463 {
464 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
465 }
466
467 /**
468 * Gets an onclick Javascript handler.
469 *
470 * @return the new onclick value
471 */
472 final public String getOnclick()
473 {
474 return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
475 }
476
477 /**
478 * Sets an onclick Javascript handler.
479 *
480 * @param onclick the new onclick value
481 */
482 final public void setOnclick(String onclick)
483 {
484 setProperty(ONCLICK_KEY, (onclick));
485 }
486
487 /**
488 * Gets an ondblclick Javascript handler.
489 *
490 * @return the new ondblclick value
491 */
492 final public String getOndblclick()
493 {
494 return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
495 }
496
497 /**
498 * Sets an ondblclick Javascript handler.
499 *
500 * @param ondblclick the new ondblclick value
501 */
502 final public void setOndblclick(String ondblclick)
503 {
504 setProperty(ONDBLCLICK_KEY, (ondblclick));
505 }
506
507 /**
508 * Gets an onmousedown Javascript handler.
509 *
510 * @return the new onmousedown value
511 */
512 final public String getOnmousedown()
513 {
514 return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
515 }
516
517 /**
518 * Sets an onmousedown Javascript handler.
519 *
520 * @param onmousedown the new onmousedown value
521 */
522 final public void setOnmousedown(String onmousedown)
523 {
524 setProperty(ONMOUSEDOWN_KEY, (onmousedown));
525 }
526
527 /**
528 * Gets an onmouseup Javascript handler.
529 *
530 * @return the new onmouseup value
531 */
532 final public String getOnmouseup()
533 {
534 return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
535 }
536
537 /**
538 * Sets an onmouseup Javascript handler.
539 *
540 * @param onmouseup the new onmouseup value
541 */
542 final public void setOnmouseup(String onmouseup)
543 {
544 setProperty(ONMOUSEUP_KEY, (onmouseup));
545 }
546
547 /**
548 * Gets an onmouseover Javascript handler.
549 *
550 * @return the new onmouseover value
551 */
552 final public String getOnmouseover()
553 {
554 return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
555 }
556
557 /**
558 * Sets an onmouseover Javascript handler.
559 *
560 * @param onmouseover the new onmouseover value
561 */
562 final public void setOnmouseover(String onmouseover)
563 {
564 setProperty(ONMOUSEOVER_KEY, (onmouseover));
565 }
566
567 /**
568 * Gets an onmousemove Javascript handler.
569 *
570 * @return the new onmousemove value
571 */
572 final public String getOnmousemove()
573 {
574 return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
575 }
576
577 /**
578 * Sets an onmousemove Javascript handler.
579 *
580 * @param onmousemove the new onmousemove value
581 */
582 final public void setOnmousemove(String onmousemove)
583 {
584 setProperty(ONMOUSEMOVE_KEY, (onmousemove));
585 }
586
587 /**
588 * Gets an onmouseout Javascript handler.
589 *
590 * @return the new onmouseout value
591 */
592 final public String getOnmouseout()
593 {
594 return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
595 }
596
597 /**
598 * Sets an onmouseout Javascript handler.
599 *
600 * @param onmouseout the new onmouseout value
601 */
602 final public void setOnmouseout(String onmouseout)
603 {
604 setProperty(ONMOUSEOUT_KEY, (onmouseout));
605 }
606
607 /**
608 * Gets an onkeypress Javascript handler.
609 *
610 * @return the new onkeypress value
611 */
612 final public String getOnkeypress()
613 {
614 return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
615 }
616
617 /**
618 * Sets an onkeypress Javascript handler.
619 *
620 * @param onkeypress the new onkeypress value
621 */
622 final public void setOnkeypress(String onkeypress)
623 {
624 setProperty(ONKEYPRESS_KEY, (onkeypress));
625 }
626
627 /**
628 * Gets an onkeydown Javascript handler.
629 *
630 * @return the new onkeydown value
631 */
632 final public String getOnkeydown()
633 {
634 return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
635 }
636
637 /**
638 * Sets an onkeydown Javascript handler.
639 *
640 * @param onkeydown the new onkeydown value
641 */
642 final public void setOnkeydown(String onkeydown)
643 {
644 setProperty(ONKEYDOWN_KEY, (onkeydown));
645 }
646
647 /**
648 * Gets an onkeyup Javascript handler.
649 *
650 * @return the new onkeyup value
651 */
652 final public String getOnkeyup()
653 {
654 return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
655 }
656
657 /**
658 * Sets an onkeyup Javascript handler.
659 *
660 * @param onkeyup the new onkeyup value
661 */
662 final public void setOnkeyup(String onkeyup)
663 {
664 setProperty(ONKEYUP_KEY, (onkeyup));
665 }
666
667 /**
668 * Gets the event handler for the component losing the focus.
669 *
670 * @return the new onblur value
671 */
672 final public String getOnblur()
673 {
674 return ComponentUtils.resolveString(getProperty(ONBLUR_KEY));
675 }
676
677 /**
678 * Sets the event handler for the component losing the focus.
679 *
680 * @param onblur the new onblur value
681 */
682 final public void setOnblur(String onblur)
683 {
684 setProperty(ONBLUR_KEY, (onblur));
685 }
686
687 /**
688 * Gets the event handler for the component gaining the focus.
689 *
690 * @return the new onfocus value
691 */
692 final public String getOnfocus()
693 {
694 return ComponentUtils.resolveString(getProperty(ONFOCUS_KEY));
695 }
696
697 /**
698 * Sets the event handler for the component gaining the focus.
699 *
700 * @param onfocus the new onfocus value
701 */
702 final public void setOnfocus(String onfocus)
703 {
704 setProperty(ONFOCUS_KEY, (onfocus));
705 }
706
707 /**
708 * Gets whether the associated control displays a visual indication of required user input. If a "required" attribute is also present, both the "required" attribute and the
709 * "showRequired" attribute must be false for the visual indication not to be displayed.
710 *
711 * @return the new showRequired value
712 */
713 final public boolean isShowRequired()
714 {
715 return ComponentUtils.resolveBoolean(getProperty(SHOW_REQUIRED_KEY), false);
716 }
717
718 /**
719 * Sets whether the associated control displays a visual indication of required user input. If a "required" attribute is also present, both the "required" attribute and the
720 * "showRequired" attribute must be false for the visual indication not to be displayed.
721 *
722 * @param showRequired the new showRequired value
723 */
724 final public void setShowRequired(boolean showRequired)
725 {
726 setProperty(SHOW_REQUIRED_KEY, showRequired ? Boolean.TRUE : Boolean.FALSE);
727 }
728
729 /**
730 * Gets <html>
731 * Character used to gain quick access to
732 * the form element specified by the
733 * <code>for</code>, if set (or this component itself,
734 * if it is a "non-simple" form element).
735 * For accessibility reasons, this functionality is not supported
736 * in screen reader mode.
737 * If the same access key appears in multiple locations in the
738 * same page of output, the rendering user agent will cycle
739 * among the elements accessed by the similar keys.
740 * <p>
741 * This attribute is sometimes referred to as the "mnemonic".
742 * </p></html>
743 *
744 * @return the new accessKey value
745 */
746 final public char getAccessKey()
747 {
748 return ComponentUtils.resolveCharacter((Character)getProperty(ACCESS_KEY_KEY));
749 }
750
751 /**
752 * Sets <html>
753 * Character used to gain quick access to
754 * the form element specified by the
755 * <code>for</code>, if set (or this component itself,
756 * if it is a "non-simple" form element).
757 * For accessibility reasons, this functionality is not supported
758 * in screen reader mode.
759 * If the same access key appears in multiple locations in the
760 * same page of output, the rendering user agent will cycle
761 * among the elements accessed by the similar keys.
762 * <p>
763 * This attribute is sometimes referred to as the "mnemonic".
764 * </p></html>
765 *
766 * @param accessKey the new accessKey value
767 */
768 final public void setAccessKey(char accessKey)
769 {
770 setProperty(ACCESS_KEY_KEY, Character.valueOf(accessKey));
771 }
772
773 /**
774 * Gets If set to TRUE on a form element, the component will automatically submit
775 * the enclosing form when an appropriate action takes place (a click, text
776 * change, etc.).
777 *
778 * @return the new autoSubmit value
779 */
780 final public boolean isAutoSubmit()
781 {
782 return ComponentUtils.resolveBoolean(getProperty(AUTO_SUBMIT_KEY), false);
783 }
784
785 /**
786 * Sets If set to TRUE on a form element, the component will automatically submit
787 * the enclosing form when an appropriate action takes place (a click, text
788 * change, etc.).
789 *
790 * @param autoSubmit the new autoSubmit value
791 */
792 final public void setAutoSubmit(boolean autoSubmit)
793 {
794 setProperty(AUTO_SUBMIT_KEY, autoSubmit ? Boolean.TRUE : Boolean.FALSE);
795 }
796
797 @Override
798 public String getDefaultEventName()
799 {
800 return "change";
801 }
802
803 @Override
804 public Collection<String> getEventNames()
805 {
806 return _EVENT_NAMES;
807 }
808
809 @Override
810 public Map<String, List<ClientBehavior>> getClientBehaviors()
811 {
812 return super.getClientBehaviors();
813 }
814
815 @Override
816 public void addClientBehavior(
817 String eventName,
818 ClientBehavior behavior)
819 {
820 super.addClientBehavior(eventName, behavior);
821 }
822
823 @Override
824 public String getFamily()
825 {
826 return COMPONENT_FAMILY;
827 }
828
829 @Override
830 protected FacesBean.Type getBeanType()
831 {
832 return TYPE;
833 }
834
835 /**
836 * Construct an instance of the CoreSelectManyCheckbox.
837 */
838 protected CoreSelectManyCheckbox(
839 String rendererType
840 )
841 {
842 super(rendererType);
843 }
844
845 static
846 {
847 TYPE.lockAndRegister("org.apache.myfaces.trinidad.SelectMany","org.apache.myfaces.trinidad.Checkbox");
848 }
849 }