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