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