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.data;
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.util.ComponentUtils;
35  
36  /**
37   *
38   * The Trinidad Table is used to display tabular data. It also supports selection
39   * (both single and multiple), sorting, record navigation and
40   * detail-disclosure.
41   * 
42   *          <section name="Table Model">
43   *            <p>
44   *             The Trinidad Table component uses a model to access the data
45   *             in the underlying list. The specific model class is
46   *             <code>org.apache.myfaces.trinidad.model.CollectionModel</code>.
47   *             You may also use other model instances, e.g.,
48   *             <code>java.util.List</code>  ,
49   *             array, and  <code>javax.faces.model.DataModel</code>.
50   *             The Table will automatically convert the instance
51   *             into a CollectionModel.
52   *            </p>
53   *          </section>
54   * 
55   * 
56   *         <section name="Columns">
57   *           <P>
58   *             The immediate children of a Table component must all be
59   *             <code>&lt;tr:column&gt;</code> components. Each visible Trinidad Column
60   *             component creates a separate column in the Table.
61   *             For more information see the documentation for
62   *             <code>&lt;column&gt;</code>
63   *           </P>
64   *         </section>
65   * 
66   * 
67   *         <section name="Range Navigation">
68   *           <P>
69   *             When the list being displayed by a Table is huge, you can enable the Table
70   *             to break up the list into ranges and display a single range at a time.
71   *             Range controls are provided on the Table to let the user scroll to the next range,
72   *             or to go back to the previous range. If the total size of the list is known, a
73   *             control to let the user jump directly to a particular part of the list is also
74   *             provided on the Table. Use the Table attributes &quot;rows&quot; and &quot;first&quot; to control the
75   *             range navigation feature.
76   *             When the user changes the range, the Table fires a <code>RangeChangeEvent</code>.
77   *           </P>
78   *         </section>
79   * 
80   * 
81   *         <section name="Displaying Details">
82   *           <P>
83   *             You can configure the Table to display or hide additional details of a
84   *             particular row in response to a user gesture. When the details feature
85   *             is enabled, a new column containing a toggle (per row) will render in
86   *             the Table. When a toggle is activated, the details for that row are
87   *             displayed. When a toggle is deactivated, the details for the row are
88   *             hidden. The user can also display or hide the details for all rows at
89   *             the same time (the controls for this feature are enabled by setting
90   *             the &quot;allDetailsEnabled&quot; property to true.)
91   *           </P>
92   *           <P>
93   *             To enable the details feature set the &quot;detailStamp&quot; facet on the
94   *             Table. Place the components that are used to show the details (of a
95   *             row), inside this facet. In the following example, the Person's age is
96   *             displayed in the details section:
97   * 
98   *             <pre>
99   *     &lt;tr:table var="row"&gt;
100  *       &lt;f:facet name="detailStamp"&gt;
101  *         &lt;tr:outputText value="#{row.age}"/&gt;
102  *       &lt;/f:facet&gt;
103  *     &lt;/tr:table&gt;
104  *             </pre>
105  *           </P>
106  *           <P>
107  *             When a detail row is shown or hidden the Table generates a
108  *             <code>DisclosureEvent</code>. If all detail rows are shown or hidden
109  *             the Table fires a <code>DisclosureAllEvent</code>.
110  *           </P>
111  *         </section>
112  * 
113  *         <section name="Selection">
114  *           <p>
115  *             The selection feature of a Table lets the user select one
116  *             or more rows in the list.  The user can then perform some operation on
117  *             the selected rows by activating an appropriate ActionSource component (e.g.,
118  *             by clicking on a commandButton).
119  *           </p>
120  *           <p>
121  *             There are two types of selection - single and multiple. The type of
122  *             selection is determined by the "rowSelection" attribute, which
123  *             can be set to "single" or "multiple".
124  *           </p>
125  *         </section>
126  * 
127  *         <section name="Sorting">
128  *           <p>
129  *             The Table component supports sorting columns in ascending or descending
130  *             order. A special 3D border on a column header lets the user know
131  *             that the column is sortable. When the user clicks on a column header
132  *             to sort a previously unsorted column, the Table sorts the
133  *             column data in ascending order. Subsequent clicks on the same
134  *             header sorts the data in the reverse order.
135  *           </p>
136  *           <p>
137  *         There are three requirements to enable sorting: the underlying table
138  *         model must support sorting, the &quot;sortProperty&quot; and &quot;sortable&quot;
139  *         attributes must be set on the column to enable the sort capability for
140  *         that column.
141  *           </p>
142  *           <P>
143  *             To support sorting, the <code>CollectionModel</code> instance
144  *             must implement the following methods:</P>
145  *             <pre>
146  *     public boolean isSortable(String propertyName)
147  *     public void setSortCriteria(List criteria)
148  *     public List getSortCriteria()
149  *             </pre>
150  *           <P>
151  *             If the underlying model is not a <code>CollectionModel</code>, the
152  *             Table automatically examines the actual data to determine which properties are
153  *             sortable. Any column that has data that
154  *             implements <code>java.lang.Comparable</code> is sortable.  This
155  *             automatic support cannot be nearly as efficient as coding sorting
156  *             directly into a <code>CollectionModel</code> (for instance,
157  *             by translating the sort into an &quot;ORDER BY&quot; SQL clause), but
158  *             is sufficient for small data sets.
159  *           </P>
160  *           <P>
161  *         To associate a column with a particular property-name to be used for
162  *         sorting purposes, use the &quot;sortProperty&quot; attribute on the column.
163  *         To enable the UI for sorting a particular column, set the
164  *         &quot;sortable&quot; property to <code>true</code>.
165  *             For more information see the documentation for
166  *             <code>&lt;column&gt;</code>.
167  *           </P>
168  *           <P>
169  *             In the following example,
170  *             both columns are sortable. Sorting the first column sorts by the
171  *             &quot;firstname&quot; property; sorting the second column sorts by the &quot;lastname&quot;
172  *             property.
173  *           </P>
174  *           <pre>
175  *     &lt;tr:table value="..."&gt;
176  *       &lt;tr:column sortProperty="firstname" sortable="true"&gt;
177  *         &lt;f:facet name="header"&gt;
178  *           &lt;tr:outputText value="Firstname" /&gt;
179  *         &lt;/f:facet&gt;
180  *         ...
181  *       &lt;/tr:column&gt;
182  *       &lt;tr:column sortProperty="lastname" sortable="true"&gt;
183  *         &lt;f:facet name="header"&gt;
184  *           &lt;tr:outputText value="Lastname" /&gt;
185  *         &lt;/f:facet&gt;
186  *         ...
187  *       &lt;/tr:column&gt;
188  *     &lt;/tr:table&gt;
189  *           </pre>
190  *         </section>
191  * 
192  *         <section name="Banding">
193  *           <P>
194  *             Banding is a technique where groups of rows (or columns)
195  *             are displayed with alternating background colors. This helps to
196  *             differentiate between adjacent rows (or columns).
197  *           </P>
198  *           <P>
199  *             The &quot;banding&quot; attribute on the Table controls the type of banding to
200  *             use.  The &quot;bandingInterval&quot; attribute controls
201  *             the number of consecutive rows (or columns) that are colored the same.
202  *           </P>
203  *           <P>
204  *             Note that the above banding attributes on the Table are ignored when
205  *             the &quot;bandingShade&quot; attribute is used on the Column.
206  *           </P>
207  *         </section>
208  *
209  * <h4>Events:</h4>
210  * <table border="1" width="100%" cellpadding="3" summary="">
211  * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
212  * <th align="left">Type</th>
213  * <th align="left">Phases</th>
214  * <th align="left">Description</th>
215  * </tr>
216  * <tr class="TableRowColor">
217  * <td valign="top"><code>org.apache.myfaces.trinidad.event.RowDisclosureEvent</code></td>
218  * <td valign="top" nowrap>Apply<br>Request<br>Values<br>Invoke<br>Application</td>
219  * <td valign="top">The expansion event is generated for a table when the detail facet of a row is expanded or collapsed. For tree or a treeTable, the expansion
220                        event is generated when tree nodes are expanded or collapsed.</td>
221  * </tr>
222  * <tr class="TableRowColor">
223  * <td valign="top"><code>org.apache.myfaces.trinidad.event.SelectionEvent</code></td>
224  * <td valign="top" nowrap>Apply<br>Request<br>Values<br>Invoke<br>Application</td>
225  * <td valign="top">The selection event is delivered when the table selection
226                        changes.</td>
227  * </tr>
228  * <tr class="TableRowColor">
229  * <td valign="top"><code>org.apache.myfaces.trinidad.event.RangeChangeEvent</code></td>
230  * <td valign="top" nowrap>Apply<br>Request<br>Values<br>Invoke<br>Application</td>
231  * <td valign="top">The range change event is delivered when the user
232                        navigates.</td>
233  * </tr>
234  * <tr class="TableRowColor">
235  * <td valign="top"><code>org.apache.myfaces.trinidad.event.SortEvent</code></td>
236  * <td valign="top" nowrap>Apply<br>Request<br>Values<br>Invoke<br>Application</td>
237  * <td valign="top">The sort event is delivered when the table column sort
238                        criteria is changed.</td>
239  * </tr>
240  * <tr class="TableRowColor">
241  * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
242  * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
243  * <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>
244  * </tr>
245  * </table>
246  */
247 public class CoreTable extends org.apache.myfaces.trinidad.component.UIXTable
248                        implements ClientBehaviorHolder
249 {
250   static public final String ROW_SELECTION_NONE = "none";
251   static public final String ROW_SELECTION_SINGLE = "single";
252   static public final String ROW_SELECTION_MULTIPLE = "multiple";
253   static public final FacesBean.Type TYPE = new FacesBean.Type(
254     org.apache.myfaces.trinidad.component.UIXTable.TYPE);
255   static public final PropertyKey HORIZONTAL_GRID_VISIBLE_KEY =
256     TYPE.registerKey("horizontalGridVisible", Boolean.class, Boolean.TRUE);
257   static public final PropertyKey VERTICAL_GRID_VISIBLE_KEY =
258     TYPE.registerKey("verticalGridVisible", Boolean.class, Boolean.TRUE);
259   static public final PropertyKey EMPTY_TEXT_KEY =
260     TYPE.registerKey("emptyText", String.class);
261   static public final PropertyKey COLUMN_BANDING_INTERVAL_KEY =
262     TYPE.registerKey("columnBandingInterval", Integer.class, Integer.valueOf(0));
263   static public final PropertyKey ROW_BANDING_INTERVAL_KEY =
264     TYPE.registerKey("rowBandingInterval", Integer.class, Integer.valueOf(0));
265   static public final PropertyKey ROW_SELECTION_KEY =
266     TYPE.registerKey("rowSelection", String.class, "none");
267   static public final PropertyKey AUTO_SUBMIT_KEY =
268     TYPE.registerKey("autoSubmit", Boolean.class, Boolean.FALSE);
269   static public final PropertyKey WIDTH_KEY =
270     TYPE.registerKey("width", String.class);
271   static public final PropertyKey SUMMARY_KEY =
272     TYPE.registerKey("summary", String.class);
273   static public final PropertyKey INLINE_STYLE_KEY =
274     TYPE.registerKey("inlineStyle", String.class);
275   static public final PropertyKey STYLE_CLASS_KEY =
276     TYPE.registerKey("styleClass", String.class);
277   static public final PropertyKey SHORT_DESC_KEY =
278     TYPE.registerKey("shortDesc", String.class);
279   static public final PropertyKey PARTIAL_TRIGGERS_KEY =
280     TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
281   static public final PropertyKey ONCLICK_KEY =
282     TYPE.registerKey("onclick", String.class);
283   static public final PropertyKey ONDBLCLICK_KEY =
284     TYPE.registerKey("ondblclick", String.class);
285   static public final PropertyKey ONMOUSEDOWN_KEY =
286     TYPE.registerKey("onmousedown", String.class);
287   static public final PropertyKey ONMOUSEUP_KEY =
288     TYPE.registerKey("onmouseup", String.class);
289   static public final PropertyKey ONMOUSEOVER_KEY =
290     TYPE.registerKey("onmouseover", String.class);
291   static public final PropertyKey ONMOUSEMOVE_KEY =
292     TYPE.registerKey("onmousemove", String.class);
293   static public final PropertyKey ONMOUSEOUT_KEY =
294     TYPE.registerKey("onmouseout", String.class);
295   static public final PropertyKey ONKEYPRESS_KEY =
296     TYPE.registerKey("onkeypress", String.class);
297   static public final PropertyKey ONKEYDOWN_KEY =
298     TYPE.registerKey("onkeydown", String.class);
299   static public final PropertyKey ONKEYUP_KEY =
300     TYPE.registerKey("onkeyup", String.class);
301   static public final PropertyKey ALL_DETAILS_ENABLED_KEY =
302     TYPE.registerKey("allDetailsEnabled", Boolean.class, Boolean.FALSE);
303   static public final PropertyKey HEIGHT_KEY =
304     TYPE.registerKey("height", String.class);
305   static public final String FOOTER_FACET = "footer";
306   static public final String HEADER_FACET = "header";
307   static public final String ACTIONS_FACET = "actions";
308 
309   static public final String COMPONENT_FAMILY =
310     "org.apache.myfaces.trinidad.Table";
311   static public final String COMPONENT_TYPE =
312     "org.apache.myfaces.trinidad.CoreTable";
313   // Supported client events for client behaviors:
314   private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
315     Arrays.asList(
316       "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove",
317       "mouseout", "keypress", "keydown", "keyup"
318     ));
319 
320   /**
321    * Construct an instance of the CoreTable.
322    */
323   public CoreTable()
324   {
325     super("org.apache.myfaces.trinidad.Table");
326   }
327 
328   /**
329    * the component used to render the table footer.
330    */
331   final public UIComponent getFooter()
332   {
333     return getFacet(FOOTER_FACET);
334   }
335 
336   /**
337    * the component used to render the table footer.
338    */
339   @SuppressWarnings("unchecked")
340   final public void setFooter(UIComponent footerFacet)
341   {
342     getFacets().put(FOOTER_FACET, footerFacet);
343   }
344 
345   /**
346    * the component used to render the table header.
347    */
348   final public UIComponent getHeader()
349   {
350     return getFacet(HEADER_FACET);
351   }
352 
353   /**
354    * the component used to render the table header.
355    */
356   @SuppressWarnings("unchecked")
357   final public void setHeader(UIComponent headerFacet)
358   {
359     getFacets().put(HEADER_FACET, headerFacet);
360   }
361 
362   /**
363    * content to be rendered inline with the navigation bar.
364    */
365   final public UIComponent getActions()
366   {
367     return getFacet(ACTIONS_FACET);
368   }
369 
370   /**
371    * content to be rendered inline with the navigation bar.
372    */
373   @SuppressWarnings("unchecked")
374   final public void setActions(UIComponent actionsFacet)
375   {
376     getFacets().put(ACTIONS_FACET, actionsFacet);
377   }
378 
379   /**
380    * Gets if the horizontal grid lines will be drawn.
381    *
382    * @return  the new horizontalGridVisible value
383    */
384   final public boolean isHorizontalGridVisible()
385   {
386     return ComponentUtils.resolveBoolean(getProperty(HORIZONTAL_GRID_VISIBLE_KEY), true);
387   }
388 
389   /**
390    * Sets if the horizontal grid lines will be drawn.
391    * 
392    * @param horizontalGridVisible  the new horizontalGridVisible value
393    */
394   final public void setHorizontalGridVisible(boolean horizontalGridVisible)
395   {
396     setProperty(HORIZONTAL_GRID_VISIBLE_KEY, horizontalGridVisible ? Boolean.TRUE : Boolean.FALSE);
397   }
398 
399   /**
400    * Gets if the vertical grid lines will be drawn.
401    *
402    * @return  the new verticalGridVisible value
403    */
404   final public boolean isVerticalGridVisible()
405   {
406     return ComponentUtils.resolveBoolean(getProperty(VERTICAL_GRID_VISIBLE_KEY), true);
407   }
408 
409   /**
410    * Sets if the vertical grid lines will be drawn.
411    * 
412    * @param verticalGridVisible  the new verticalGridVisible value
413    */
414   final public void setVerticalGridVisible(boolean verticalGridVisible)
415   {
416     setProperty(VERTICAL_GRID_VISIBLE_KEY, verticalGridVisible ? Boolean.TRUE : Boolean.FALSE);
417   }
418 
419   /**
420    * Gets text displayed when a table is empty.
421    *
422    * @return  the new emptyText value
423    */
424   final public String getEmptyText()
425   {
426     return ComponentUtils.resolveString(getProperty(EMPTY_TEXT_KEY));
427   }
428 
429   /**
430    * Sets text displayed when a table is empty.
431    * 
432    * @param emptyText  the new emptyText value
433    */
434   final public void setEmptyText(String emptyText)
435   {
436     setProperty(EMPTY_TEXT_KEY, (emptyText));
437   }
438 
439   /**
440    * Gets the interval between which the column banding alternates.  For example, a columnBandingInterval of 1 would display alternately banded columns.
441    *
442    * @return  the new columnBandingInterval value
443    */
444   final public int getColumnBandingInterval()
445   {
446     return ComponentUtils.resolveInteger(getProperty(COLUMN_BANDING_INTERVAL_KEY), 0);
447   }
448 
449   /**
450    * Sets the interval between which the column banding alternates.  For example, a columnBandingInterval of 1 would display alternately banded columns.
451    * 
452    * @param columnBandingInterval  the new columnBandingInterval value
453    */
454   final public void setColumnBandingInterval(int columnBandingInterval)
455   {
456     setProperty(COLUMN_BANDING_INTERVAL_KEY, Integer.valueOf(columnBandingInterval));
457   }
458 
459   /**
460    * Gets the interval between which the row banding alternates.  For example, rowBandingInterval=1 would displayalternately banded rows in the Grid.
461    *
462    * @return  the new rowBandingInterval value
463    */
464   final public int getRowBandingInterval()
465   {
466     return ComponentUtils.resolveInteger(getProperty(ROW_BANDING_INTERVAL_KEY), 0);
467   }
468 
469   /**
470    * Sets the interval between which the row banding alternates.  For example, rowBandingInterval=1 would displayalternately banded rows in the Grid.
471    * 
472    * @param rowBandingInterval  the new rowBandingInterval value
473    */
474   final public void setRowBandingInterval(int rowBandingInterval)
475   {
476     setProperty(ROW_BANDING_INTERVAL_KEY, Integer.valueOf(rowBandingInterval));
477   }
478 
479   /**
480    * Gets whether rows in this table selectable. Valid values are "none", "single", "multiple"
481    *
482    * @return  the new rowSelection value
483    */
484   final public String getRowSelection()
485   {
486     return ComponentUtils.resolveString(getProperty(ROW_SELECTION_KEY), "none");
487   }
488 
489   /**
490    * Sets whether rows in this table selectable. Valid values are "none", "single", "multiple"
491    * 
492    * @param rowSelection  the new rowSelection value
493    */
494   final public void setRowSelection(String rowSelection)
495   {
496     setProperty(ROW_SELECTION_KEY, (rowSelection));
497   }
498 
499   /**
500    * Gets If set to TRUE on a form element, the component will automatically submit
501    *      the enclosing form when an appropriate action takes place (a click, text
502    *      change, etc.).  This only takes effect if rowSelection attribute enabled.
503    *
504    * @return  the new autoSubmit value
505    */
506   final public boolean isAutoSubmit()
507   {
508     return ComponentUtils.resolveBoolean(getProperty(AUTO_SUBMIT_KEY), false);
509   }
510 
511   /**
512    * Sets If set to TRUE on a form element, the component will automatically submit
513    *      the enclosing form when an appropriate action takes place (a click, text
514    *      change, etc.).  This only takes effect if rowSelection attribute enabled.
515    * 
516    * @param autoSubmit  the new autoSubmit value
517    */
518   final public void setAutoSubmit(boolean autoSubmit)
519   {
520     setProperty(AUTO_SUBMIT_KEY, autoSubmit ? Boolean.TRUE : Boolean.FALSE);
521   }
522 
523   /**
524    * Gets the width of the table.  The value must either be a number of pixels or a percentage - it is not a CSS width.
525    *
526    * @return  the new width value
527    */
528   final public String getWidth()
529   {
530     return ComponentUtils.resolveString(getProperty(WIDTH_KEY));
531   }
532 
533   /**
534    * Sets the width of the table.  The value must either be a number of pixels or a percentage - it is not a CSS width.
535    * 
536    * @param width  the new width value
537    */
538   final public void setWidth(String width)
539   {
540     setProperty(WIDTH_KEY, (width));
541   }
542 
543   /**
544    * Gets the summary of this table's purpose and structure
545    *          for user agents rendering to non-visual media.
546    *
547    * @return  the new summary value
548    */
549   final public String getSummary()
550   {
551     return ComponentUtils.resolveString(getProperty(SUMMARY_KEY));
552   }
553 
554   /**
555    * Sets the summary of this table's purpose and structure
556    *          for user agents rendering to non-visual media.
557    * 
558    * @param summary  the new summary value
559    */
560   final public void setSummary(String summary)
561   {
562     setProperty(SUMMARY_KEY, (summary));
563   }
564 
565   /**
566    * Gets the CSS styles to use for this component.
567    *
568    * @return  the new inlineStyle value
569    */
570   final public String getInlineStyle()
571   {
572     return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
573   }
574 
575   /**
576    * Sets the CSS styles to use for this component.
577    * 
578    * @param inlineStyle  the new inlineStyle value
579    */
580   final public void setInlineStyle(String inlineStyle)
581   {
582     setProperty(INLINE_STYLE_KEY, (inlineStyle));
583   }
584 
585   /**
586    * Gets a CSS style class to use for this component.
587    *
588    * @return  the new styleClass value
589    */
590   final public String getStyleClass()
591   {
592     return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
593   }
594 
595   /**
596    * Sets a CSS style class to use for this component.
597    * 
598    * @param styleClass  the new styleClass value
599    */
600   final public void setStyleClass(String styleClass)
601   {
602     setProperty(STYLE_CLASS_KEY, (styleClass));
603   }
604 
605   /**
606    * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
607    *
608    * @return  the new shortDesc value
609    */
610   final public String getShortDesc()
611   {
612     return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
613   }
614 
615   /**
616    * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
617    * 
618    * @param shortDesc  the new shortDesc value
619    */
620   final public void setShortDesc(String shortDesc)
621   {
622     setProperty(SHORT_DESC_KEY, (shortDesc));
623   }
624 
625   /**
626    * Gets the IDs of the components that should trigger a partial update.
627    *         <p>
628    *         This component will listen on the trigger components. If one of the
629    *         trigger components receives an event that will cause it to update
630    *         in some way, this component will request to be updated too.</p>
631    *         <p>
632    *         Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
633    *         </p>
634    *         <p>
635    *         Identifiers must account for NamingContainers.  You can use a single colon to start the search from the root,
636    *         or use multiple colons to move up through the NamingContainer. For example,
637    *         "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), 
638    *         ":::" will pop out of two naming containers, etc. The search for
639    *         the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the 
640    *         component with id = commandButton1 after popping out of two naming containers relative to this component.
641    *         To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
642    *
643    * @return  the new partialTriggers value
644    */
645   final public String[] getPartialTriggers()
646   {
647     return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
648   }
649 
650   /**
651    * Sets the IDs of the components that should trigger a partial update.
652    *         <p>
653    *         This component will listen on the trigger components. If one of the
654    *         trigger components receives an event that will cause it to update
655    *         in some way, this component will request to be updated too.</p>
656    *         <p>
657    *         Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
658    *         </p>
659    *         <p>
660    *         Identifiers must account for NamingContainers.  You can use a single colon to start the search from the root,
661    *         or use multiple colons to move up through the NamingContainer. For example,
662    *         "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), 
663    *         ":::" will pop out of two naming containers, etc. The search for
664    *         the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the 
665    *         component with id = commandButton1 after popping out of two naming containers relative to this component.
666    *         To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
667    * 
668    * @param partialTriggers  the new partialTriggers value
669    */
670   final public void setPartialTriggers(String[] partialTriggers)
671   {
672     setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
673   }
674 
675   /**
676    * Gets an onclick Javascript handler.
677    *
678    * @return  the new onclick value
679    */
680   final public String getOnclick()
681   {
682     return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
683   }
684 
685   /**
686    * Sets an onclick Javascript handler.
687    * 
688    * @param onclick  the new onclick value
689    */
690   final public void setOnclick(String onclick)
691   {
692     setProperty(ONCLICK_KEY, (onclick));
693   }
694 
695   /**
696    * Gets an ondblclick Javascript handler.
697    *
698    * @return  the new ondblclick value
699    */
700   final public String getOndblclick()
701   {
702     return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
703   }
704 
705   /**
706    * Sets an ondblclick Javascript handler.
707    * 
708    * @param ondblclick  the new ondblclick value
709    */
710   final public void setOndblclick(String ondblclick)
711   {
712     setProperty(ONDBLCLICK_KEY, (ondblclick));
713   }
714 
715   /**
716    * Gets an onmousedown Javascript handler.
717    *
718    * @return  the new onmousedown value
719    */
720   final public String getOnmousedown()
721   {
722     return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
723   }
724 
725   /**
726    * Sets an onmousedown Javascript handler.
727    * 
728    * @param onmousedown  the new onmousedown value
729    */
730   final public void setOnmousedown(String onmousedown)
731   {
732     setProperty(ONMOUSEDOWN_KEY, (onmousedown));
733   }
734 
735   /**
736    * Gets an onmouseup Javascript handler.
737    *
738    * @return  the new onmouseup value
739    */
740   final public String getOnmouseup()
741   {
742     return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
743   }
744 
745   /**
746    * Sets an onmouseup Javascript handler.
747    * 
748    * @param onmouseup  the new onmouseup value
749    */
750   final public void setOnmouseup(String onmouseup)
751   {
752     setProperty(ONMOUSEUP_KEY, (onmouseup));
753   }
754 
755   /**
756    * Gets an onmouseover Javascript handler.
757    *
758    * @return  the new onmouseover value
759    */
760   final public String getOnmouseover()
761   {
762     return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
763   }
764 
765   /**
766    * Sets an onmouseover Javascript handler.
767    * 
768    * @param onmouseover  the new onmouseover value
769    */
770   final public void setOnmouseover(String onmouseover)
771   {
772     setProperty(ONMOUSEOVER_KEY, (onmouseover));
773   }
774 
775   /**
776    * Gets an onmousemove Javascript handler.
777    *
778    * @return  the new onmousemove value
779    */
780   final public String getOnmousemove()
781   {
782     return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
783   }
784 
785   /**
786    * Sets an onmousemove Javascript handler.
787    * 
788    * @param onmousemove  the new onmousemove value
789    */
790   final public void setOnmousemove(String onmousemove)
791   {
792     setProperty(ONMOUSEMOVE_KEY, (onmousemove));
793   }
794 
795   /**
796    * Gets an onmouseout Javascript handler.
797    *
798    * @return  the new onmouseout value
799    */
800   final public String getOnmouseout()
801   {
802     return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
803   }
804 
805   /**
806    * Sets an onmouseout Javascript handler.
807    * 
808    * @param onmouseout  the new onmouseout value
809    */
810   final public void setOnmouseout(String onmouseout)
811   {
812     setProperty(ONMOUSEOUT_KEY, (onmouseout));
813   }
814 
815   /**
816    * Gets an onkeypress Javascript handler.
817    *
818    * @return  the new onkeypress value
819    */
820   final public String getOnkeypress()
821   {
822     return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
823   }
824 
825   /**
826    * Sets an onkeypress Javascript handler.
827    * 
828    * @param onkeypress  the new onkeypress value
829    */
830   final public void setOnkeypress(String onkeypress)
831   {
832     setProperty(ONKEYPRESS_KEY, (onkeypress));
833   }
834 
835   /**
836    * Gets an onkeydown Javascript handler.
837    *
838    * @return  the new onkeydown value
839    */
840   final public String getOnkeydown()
841   {
842     return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
843   }
844 
845   /**
846    * Sets an onkeydown Javascript handler.
847    * 
848    * @param onkeydown  the new onkeydown value
849    */
850   final public void setOnkeydown(String onkeydown)
851   {
852     setProperty(ONKEYDOWN_KEY, (onkeydown));
853   }
854 
855   /**
856    * Gets an onkeyup Javascript handler.
857    *
858    * @return  the new onkeyup value
859    */
860   final public String getOnkeyup()
861   {
862     return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
863   }
864 
865   /**
866    * Sets an onkeyup Javascript handler.
867    * 
868    * @param onkeyup  the new onkeyup value
869    */
870   final public void setOnkeyup(String onkeyup)
871   {
872     setProperty(ONKEYUP_KEY, (onkeyup));
873   }
874 
875   /**
876    * Gets whether or not to enable the show/hide all
877    *               links above the table,
878    *               which allow the user to show/hide all the detail rows.
879    *               To enable the detail rows, a "detailStamp" facet must be set on
880    *               this Table.
881    *
882    * @return  the new allDetailsEnabled value
883    */
884   final public boolean isAllDetailsEnabled()
885   {
886     return ComponentUtils.resolveBoolean(getProperty(ALL_DETAILS_ENABLED_KEY), false);
887   }
888 
889   /**
890    * Sets whether or not to enable the show/hide all
891    *               links above the table,
892    *               which allow the user to show/hide all the detail rows.
893    *               To enable the detail rows, a "detailStamp" facet must be set on
894    *               this Table.
895    * 
896    * @param allDetailsEnabled  the new allDetailsEnabled value
897    */
898   final public void setAllDetailsEnabled(boolean allDetailsEnabled)
899   {
900     setProperty(ALL_DETAILS_ENABLED_KEY, allDetailsEnabled ? Boolean.TRUE : Boolean.FALSE);
901   }
902 
903   /**
904    * Gets Sets a height to the content of the table. 
905    *         This generates a scrollbar to access all rows in the current range.
906    *
907    * @return  the new height value
908    */
909   final public String getHeight()
910   {
911     return ComponentUtils.resolveString(getProperty(HEIGHT_KEY));
912   }
913 
914   /**
915    * Sets Sets a height to the content of the table. 
916    *         This generates a scrollbar to access all rows in the current range.
917    * 
918    * @param height  the new height value
919    */
920   final public void setHeight(String height)
921   {
922     setProperty(HEIGHT_KEY, (height));
923   }
924 
925   @Override
926   public String getDefaultEventName()
927   {
928     return "click";
929   }
930 
931   @Override
932   public Collection<String> getEventNames()
933   {
934     return _EVENT_NAMES;
935   }
936 
937   @Override
938   public Map<String, List<ClientBehavior>> getClientBehaviors()
939   {
940     return super.getClientBehaviors();
941   }
942 
943   @Override
944   public void addClientBehavior(
945     String         eventName,
946     ClientBehavior behavior)
947   {
948     super.addClientBehavior(eventName, behavior);
949   }
950 
951   @Override
952   public String getFamily()
953   {
954     return COMPONENT_FAMILY;
955   }
956 
957   @Override
958   protected FacesBean.Type getBeanType()
959   {
960     return TYPE;
961   }
962 
963   /**
964    * Construct an instance of the CoreTable.
965    */
966   protected CoreTable(
967     String rendererType
968     )
969   {
970     super(rendererType);
971   }
972 
973   static
974   {
975     TYPE.lockAndRegister("org.apache.myfaces.trinidad.Table","org.apache.myfaces.trinidad.Table");
976   }
977 }