View Javadoc

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