0001: /*
0002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0003: *
0004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
0005: *
0006: * The contents of this file are subject to the terms of either the GNU
0007: * General Public License Version 2 only ("GPL") or the Common
0008: * Development and Distribution License("CDDL") (collectively, the
0009: * "License"). You may not use this file except in compliance with the
0010: * License. You can obtain a copy of the License at
0011: * http://www.netbeans.org/cddl-gplv2.html
0012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
0013: * specific language governing permissions and limitations under the
0014: * License. When distributing the software, include this License Header
0015: * Notice in each file and include the License file at
0016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
0017: * particular file as subject to the "Classpath" exception as provided
0018: * by Sun in the GPL Version 2 section of the License file that
0019: * accompanied this code. If applicable, add the following below the
0020: * License Header, with the fields enclosed by brackets [] replaced by
0021: * your own identifying information:
0022: * "Portions Copyrighted [year] [name of copyright owner]"
0023: *
0024: * Contributor(s):
0025: *
0026: * The Original Software is NetBeans. The Initial Developer of the Original
0027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
0028: * Microsystems, Inc. All Rights Reserved.
0029: *
0030: * If you wish your version of this file to be governed by only the CDDL
0031: * or only the GPL Version 2, indicate your decision by adding
0032: * "[Contributor] elects to include this software in this distribution
0033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
0034: * single choice of license, a recipient has the option to distribute
0035: * your version of this file under either the CDDL, the GPL Version 2 or
0036: * to extend the choice of license to its licensees as provided above.
0037: * However, if you add GPL Version 2 code and therefore, elected the GPL
0038: * Version 2 license, then the option applies only if the new code is
0039: * made subject to such option by the copyright holder.
0040: */
0041: package com.sun.rave.web.ui.component;
0042:
0043: import java.io.IOException;
0044: import javax.faces.component.UIComponent;
0045: import javax.faces.context.FacesContext;
0046: import javax.faces.el.MethodBinding;
0047: import javax.faces.el.ValueBinding;
0048:
0049: /**
0050: * Use the <code>ui:tableColumn</code>
0051: * tag to define the column cells of a table, inside a <a
0052: * href="tableRowGroup.html"><code>ui:table</code></a>
0053: * tag. A <code>ui:tableRowGroup</code> must include at least one <code>ui:tableColumn</code>
0054: * tag.<br>
0055: * <p><span style="color: rgb(0, 0, 0);">The <code>ui:table</code>
0056: * tag is
0057: * used to define the structure and actions of the table, and is a
0058: * container for <a href="tableRowGroup.html"><code>ui:tableRowGroup</code></a>
0059: * which define the rows of a table. The <code>ui:tableRowGroup</code>
0060: * tag is a container for <code></code></span><span
0061: * style="color: rgb(0, 0, 0);"><code>ui:tableColumn</code></span><span
0062: * style="color: rgb(0, 0, 0);"><code></code>
0063: * tags, which are used <code></code>to define the
0064: * columns of the table. </span><span
0065: * style="color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);">
0066: * The </span><a href="table.html" style="color: rgb(0, 0, 0);">documentation
0067: * for the <code>ui:table</code> tag</a><span style="color: rgb(0, 0, 0);">
0068: * contains detailed information
0069: * about the table component. This page provides details about how
0070: * to define table columns only.</span><br>
0071: * </span></p>
0072: * <p>
0073: * </p>
0074: * <p>
0075: * </p>
0076: * <h3>HTML Elements and Layout</h3>
0077: * <span style="text-decoration: line-through;"></span><span
0078: * style="color: rgb(0, 0, 0);">The tableColumn component is
0079: * used to define attributes for XHTML <code><td></code>
0080: * elements, which are used
0081: * to display table data cells. However, the rendering of
0082: * column headers and footers is handled by the tableRowGroup component.
0083: * The <a href="#diagram">diagram</a> shows the table layout, and
0084: * highlights the areas that are defined with the <code>ui:tableColumn</code>
0085: * tag. </span><br>
0086: * <br>
0087: * <a name="diagram"></a><br>
0088: * <table style="text-align: left; width: 100%;" border="1" cellpadding="2"
0089: * cellspacing="2">
0090: * <tbody>
0091: * <tr style="color: rgb(192, 192, 192);">
0092: * <td
0093: * style="vertical-align: top; background-color: rgb(153, 153, 153);"
0094: * rowspan="1" colspan="1">Title
0095: * Bar </td>
0096: * </tr>
0097: * <tr style="color: rgb(153, 153, 153);">
0098: * <td
0099: * style="vertical-align: top; background-color: rgb(208, 208, 208);"
0100: * rowspan="1" colspan="1">Action
0101: * Bar (top) </td>
0102: * </tr>
0103: * <tr>
0104: * <td
0105: * style="vertical-align: top; background-color: rgb(210, 224, 235);">
0106: * <table style="text-align: left; width: 100%;" border="1"
0107: * cellpadding="2" cellspacing="2">
0108: * <tbody>
0109: * <tr>
0110: * <td style="vertical-align: top;">Column Header <big><span
0111: * style="color: rgb(0, 0, 0);"><small>(specified </small></span></big>with
0112: * <code>headerText</code>
0113: * attribute or <code>header</code> facet <big><span
0114: * style="color: rgb(0, 0, 0);"><small>in first <code>ui:tableColumn</code>
0115: * tag in <code>ui:tableRowGroup</code> tag)</small></span></big></td>
0116: * <td style="vertical-align: top;">Column Header <big><span
0117: * style="color: rgb(0, 0, 0);"><small>(specified </small></span></big>with
0118: * <code>headerText</code>
0119: * attribute or <code>header</code> facet <big><span
0120: * style="color: rgb(0, 0, 0);"><small>in second <code>ui:tableColumn</code>
0121: * tag in <code>ui:tableRowGroup</code> tag)</small></span></big></td>
0122: * </tr>
0123: * <tr style="color: rgb(153, 153, 153);">
0124: * <td
0125: * style="vertical-align: top; background-color: rgb(232, 232, 232);"
0126: * rowspan="1" colspan="2">Group
0127: * Header Bar </td>
0128: * </tr>
0129: * <tr>
0130: * <td
0131: * style="vertical-align: top; background-color: rgb(232, 232, 232); color: rgb(153, 153, 153);"><span
0132: * style="font-style: italic;">Table
0133: * data</span> <code><br>
0134: * <br>
0135: * <br>
0136: * <br>
0137: * <br>
0138: * </code></td>
0139: * <td
0140: * style="vertical-align: top; background-color: rgb(232, 232, 232); color: rgb(153, 153, 153);"><span
0141: * style="font-style: italic;">Table
0142: * data</span> <code></code></td>
0143: * </tr>
0144: * <tr>
0145: * <td style="vertical-align: top;">Column Footer<span
0146: * style="color: rgb(0, 0, 0);"> (specified </span>with <code>footerText</code>
0147: * attribute or <code>footer</code>
0148: * facet <span style="color: rgb(0, 0, 0);">in first <code>ui:tableColumn</code>
0149: * tag in <code>ui:tableRowGroup</code> tag)</span></td>
0150: * <td style="vertical-align: top;">Column Footer <span
0151: * style="color: rgb(0, 0, 0);">(specified </span>with <code>footerText</code>
0152: * attribute or <code>footer</code>
0153: * facet <span style="color: rgb(0, 0, 0);">in second <code>ui:tableColumn</code>
0154: * tag in <code>ui:tableRowGroup</code> tag)</span></td>
0155: * </tr>
0156: * <tr style="color: rgb(153, 153, 153);">
0157: * <td
0158: * style="vertical-align: top; background-color: rgb(232, 232, 232);"
0159: * rowspan="1" colspan="2">Group
0160: * Footer Bar </td>
0161: * </tr>
0162: * <tr>
0163: * <td style="vertical-align: top;">Table
0164: * Column Footer (specified with <code>tableFooterText</code>
0165: * attribute <code></code>or <code>tableFooter</code> facet in <code>ui:tableColumn</code>
0166: * tag)</td>
0167: * <td style="vertical-align: top;">Table
0168: * Column Footer (specified with <code>tableFooterText</code>
0169: * attribute <code></code>or <code>tableFooter</code> facet <code></code>in
0170: * <code>ui:tableColumn</code>
0171: * tag)</td>
0172: * </tr>
0173: * </tbody>
0174: * </table>
0175: * <big><span style="color: rgb(0, 0, 0);"> </span></big></td>
0176: * </tr>
0177: * <tr>
0178: * <td
0179: * style="vertical-align: top; background-color: rgb(208, 208, 208);"><span
0180: * style="color: rgb(153, 153, 153);">Action
0181: * Bar (bottom) </span><small> </small> </td>
0182: * </tr>
0183: * <tr style="color: rgb(192, 192, 192);">
0184: * <td
0185: * style="vertical-align: top; background-color: rgb(153, 153, 153);"
0186: * rowspan="1" colspan="1">Footer<code></code><code> </code></td>
0187: * </tr>
0188: * </tbody>
0189: * </table>
0190: * <br style="color: rgb(102, 102, 204);">
0191: * <h4 style="color: rgb(0, 0, 0);">Column Header</h4>
0192: * <span style="color: rgb(0, 0, 0);">The Column Header area
0193: * displays
0194: * a header for each table column. If you specify the text of a
0195: * column header with the <code>headerText</code> attribute in the <code>ui:tableColumn</code>
0196: * tag, the default implementation of the header is rendered. You can
0197: * specify a separate component to provide column header content by using
0198: * the <code>header</code>
0199: * facet, which overrides the <code>headerText</code> attribute.
0200: * You can add extra HTML code to the
0201: * header's rendered<code> <td></code> element with the <code>extraHeaderHtml</code>
0202: * attribute.<br>
0203: * <br>
0204: * The following <code>ui:tableColumn</code> attributes can be used to
0205: * change
0206: * the appearance and behavior for sorting of the Column Header:<br>
0207: * </span>
0208: * <ul style="color: rgb(0, 0, 0);">
0209: * <li>
0210: * <p><code>sort</code>
0211: * specifies a sort key and makes a column sortable. </p>
0212: * <p> </p>
0213: * </li>
0214: * <li>
0215: * <p><code>sortIcon</code>
0216: * specifies a theme identifier to select a different image to use as the
0217: * sort icon that is displayed in the header of a sortable column.</p>
0218: * </li>
0219: * <li>
0220: * <p><code>sortImageURL</code>
0221: * specifies the path to an image to use as the sort icon that is
0222: * displayed in the header of a
0223: * sortable column.</p>
0224: * </li>
0225: * <li>
0226: * <p><code>descending</code> when set to true causes the column
0227: * to be sorted in descending order.</p>
0228: * </li>
0229: * <li><code>severity </code>specifies the severity of an alarm
0230: * in each cell, and causes the column to sort on the severity value
0231: * if used with the <code>sort</code> attribute. <code></code></li>
0232: * </ul>
0233: * <span style="color: rgb(0, 0, 0);">
0234: * </span>
0235: * <h4 style="color: rgb(0, 0, 0);">Column Footer</h4>
0236: * <span style="color: rgb(0, 0, 0);">The Column Footers area
0237: * displays a footer for each table column.
0238: * If you specify the text of a column footer with the <code>footerText</code>
0239: * attribute in the <code>ui:tableColumn</code> tag, the default
0240: * implementation of the footer is rendered. You can specify a separate
0241: * component to provide footer content by using the <code>footer</code>
0242: * facet, which overrides the <code>footerText</code> attribute.
0243: * You can add extra HTML code to the
0244: * footer's rendered<code> <td></code> element with the <code>extraFooterHtml</code>
0245: * attribute.<br>
0246: * </span>
0247: * <h4 style="color: rgb(0, 0, 0);">Table Column Footer</h4>
0248: * <span style="color: rgb(0, 0, 0);">The Table Column
0249: * Footers area displays column footers at the
0250: * bottom of the table.
0251: * The table column footers are useful in tables with multiple groups of
0252: * rows. If you specify the text of table column footers with the <code>tableFooterText</code>
0253: * attribute, the default implementation of the footer is rendered.
0254: * You can specify a separate component to provide the content for a table
0255: * column footer by
0256: * using the <code>tableFooter</code> facet, which overrides the <code>tableFooterText</code>
0257: * attribute. You
0258: * can add extra HTML code to the table footer's rendered<code> <td></code>
0259: * element with the <code>extraTableFooterHtml</code> attribute.<br>
0260: * </span>
0261: * <h4 style="color: rgb(0, 0, 0);">Alignment and Formatting
0262: * of Cells</h4>
0263: * <span style="color: rgb(0, 0, 0);">In addition to defining the
0264: * headers and footers for columns, the
0265: * <code>ui:tableColumn</code> tag can be used to set other aspects of the
0266: * table's
0267: * appearance and behavior. <br>
0268: * <br>
0269: * The following attributes affect
0270: * the alignment of table cells:<br>
0271: * </span>
0272: * <ul style="color: rgb(0, 0, 0);">
0273: * <li><code>align </code>specifies the horizontal alignment
0274: * for
0275: * the cell data in the
0276: * column</li>
0277: * <li><code>alignKey </code>specifies a particular data element on
0278: * which to align the
0279: * cell data <br>
0280: * </li>
0281: * <li><code>char </code>specifies a character to use for
0282: * horizontal alignment of cell data<br>
0283: * </li>
0284: * <li><code>charOff </code>specifies the offset of
0285: * the first
0286: * occurrence of
0287: * the alignment character</li>
0288: * <li><code>valign </code>specifies the vertical alignment
0289: * for
0290: * the content of each cell</li>
0291: * </ul>
0292: * <span style="color: rgb(0, 0, 0);">
0293: * Attributes that can be used to make the column headers more accessible
0294: * for adaptive technologies include:<br>
0295: * </span>
0296: * <ul style="color: rgb(0, 0, 0);">
0297: * <li> <code>scope</code> set
0298: * to a keyword to specify the portion of the table that this header
0299: * applies to. <br>
0300: * </li>
0301: * <li><code>rowHeader</code>
0302: * set to true to specify that the content of the column's cells applies
0303: * to the row in which the
0304: * cell is located. </li>
0305: * </ul>
0306: * <span style="color: rgb(0, 0, 0);">Attributes that affect other
0307: * aspects of cells include:</span><br style="color: rgb(0, 0, 0);">
0308: * <ul style="color: rgb(0, 0, 0);">
0309: * <li><code>abbr</code>
0310: * specifies an abbreviated form of the cell's content, to
0311: * be used when the browser has little space to render the content.<br>
0312: * </li>
0313: * <li><code>embeddedActions</code>
0314: * when set to true causes separators to be rendered
0315: * between multiple action hyperlinks.</li>
0316: * <li><code>emptyCell</code> when
0317: * set to
0318: * true causes an unexpectedly empty cell to be
0319: * rendered with an appropriate image.</li>
0320: * <li><code>spacerColumn</code> when
0321: * set to true causes the column to be rendered as a blank column to
0322: * enhance table spacing.<code><br>
0323: * </code></li>
0324: * <li><code>height </code>specifies
0325: * the height of a column's cells.<code><br>
0326: * </code></li>
0327: * <li><code>width </code>specifies
0328: * the width of a column's cells.<code><br>
0329: * </code></li>
0330: * <li><code>nowrap </code>prevents
0331: * the content of the cell from wrapping to a new line.<br>
0332: * </li>
0333: * </ul>
0334: * <h4 style="color: rgb(0, 0, 0);">Selection Column</h4>
0335: * <span style="color: rgb(0, 0, 0);">To make table rows selectable,
0336: * the first column of the table should display only checkboxes or radio
0337: * buttons that the user clicks to select the row. When you set the <code>selectId</code>
0338: * attribute in the <code>ui:tableColumn</code> tag and include a <code>ui:checkbox</code>
0339: * or <code>ui:radioButton</code> tag as a child of the <code>ui:tableColumn</code></span><span
0340: * style="color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);">
0341: * tag, the first column is rendered
0342: * appropriately. See the</span><a href="#SelectSingleRow"
0343: * style="color: rgb(0, 0, 0);"> Select Single
0344: * Row example </a><span style="color: rgb(0, 0, 0);">for more
0345: * information. </span><br style="color: rgb(0, 0, 0);">
0346: * <br>
0347: * </span>
0348: * <h3>Facets</h3>
0349: * <span style="color: rgb(0, 0, 0);">The </span><code
0350: * style="color: rgb(0, 0, 0);">ui:tableColumn</code><span
0351: * style="color: rgb(0, 0, 0);"> tag supports the following facets,
0352: * which
0353: * allow you to customize the
0354: * layout of the component.</span><br style="color: rgb(0, 0, 0);">
0355: * <br style="color: rgb(0, 0, 0);">
0356: * <table style="width: 100%; color: rgb(0, 0, 0);" border="1"
0357: * cellpadding="2" cellspacing="2">
0358: * <tbody>
0359: * <tr>
0360: * <td style="vertical-align: top;"><span style="font-weight: bold;">Facet
0361: * Name</span><code><br>
0362: * </code></td>
0363: * <td style="vertical-align: top; font-weight: bold;">Table Item
0364: * Implemented by the Facet<br>
0365: * </td>
0366: * </tr>
0367: * <tr>
0368: * <td><code>footer
0369: * <br>
0370: * </code></td>
0371: * <td>Footer that is displayed at the bottom of the column within
0372: * the group of rows. The footer applies to the column of cells that are
0373: * defined
0374: * by the <code>ui:tableColumn</code>
0375: * tag. This facet can be used to replace the default footer for the
0376: * column.<br>
0377: * </td>
0378: * </tr>
0379: * <tr>
0380: * <td><code>header</code></td>
0381: * <td>Header that applies to the column of cells that are defined
0382: * by the <code>ui:tableColumn</code>
0383: * tag. This facet can be used to replace the default header for the
0384: * column. </td>
0385: * </tr>
0386: * <tr>
0387: * <td style="vertical-align: top;"><code>tableFooter<br>
0388: * </code></td>
0389: * <td style="vertical-align: top;">Footer that is displayed at the
0390: * bottom of the table, below the last group of rows, above the Action Bar
0391: * and overall table footer. The table footer content should apply to the
0392: * column for all the groups of rows in the table. This facet can be
0393: * used to replace the default table footer for the
0394: * column. </td>
0395: * </tr>
0396: * </tbody>
0397: * </table>
0398: * <br style="color: rgb(0, 0, 0);">
0399: * <h3 style="color: rgb(0, 0, 0);">Client Side JavaScript
0400: * Functions</h3>
0401: * <span style="color: rgb(0, 0, 0);">See the </span><a
0402: * href="table.html#JavaScript" style="color: rgb(0, 0, 0);"><code>ui:table</code>
0403: * tag's
0404: * JavaScript documentation</a><span style="color: rgb(0, 0, 0);">.
0405: * The same functions are used for the
0406: * <code>ui:tableColumn</code> tag.</span><br>
0407: * <br>
0408: * <h3>Examples
0409: * </h3>
0410: * <span style="color: rgb(0, 0, 0);">The following examples use a
0411: * backing bean called </span><a href="table.html#Example:_TableBean_"
0412: * style="color: rgb(0, 0, 0);">TableBean</a><span
0413: * style="color: rgb(0, 0, 0);">,
0414: * which is shown in the <code>ui:table</code> tag documentation. </span><a
0415: * href="table.html#UtilityClasses" style="color: rgb(0, 0, 0);">Utility
0416: * classes</a><span style="color: rgb(0, 0, 0);"> used in the examples are
0417: * included
0418: * in this page, after the examples.
0419: * Additional examples are shown in the </span><code
0420: * style="color: rgb(0, 0, 0);"><a href="table.html#Examples">ui:table</a></code><span
0421: * style="color: rgb(0, 0, 0);">
0422: * and </span><code style="color: rgb(0, 0, 0);"><a
0423: * href="tableRowGroup.html">ui:tableRowGroup</a></code><span
0424: * style="color: rgb(0, 0, 0);">
0425: * documents.<br>
0426: * <br>
0427: * All examples assume that the <code>ui:table</code> tag is contained
0428: * within an HTML <code><form></code> element so that actions can
0429: * submit form data. <br>
0430: * </span><br style="color: rgb(0, 0, 0);">
0431: * <span style="font-weight: bold; color: rgb(0, 0, 0);">Examples in
0432: * this file:<br>
0433: * <br>
0434: * </span>
0435: * <div style="margin-left: 40px; color: rgb(0, 0, 0);"><a
0436: * href="tableColumn.html#SortableTable">Example
0437: * 1: Sortable Table</a><br>
0438: * <p><a href="tableColumn.html#SelectSingleRow">Example
0439: * 2: Select Single
0440: * Row</a><br>
0441: * </p>
0442: * <p><a href="tableColumn.html#SelectMultipleRows">Example
0443: * 3: Select
0444: * Multiple Rows</a><br>
0445: * </p>
0446: * <p><a href="#HiddenSelectedRows">Example 4: Hidden Selected Rows</a><br>
0447: * </p>
0448: * <a href="#SpacerColumn">Example
0449: * 5: Spacer Columns</a><br>
0450: * <p><a href="#EmptyCells">Example 6: Empty Cells</a><br>
0451: * </p>
0452: * <p><a href="#EmbeddedActions">Example 7: Embedded Actions</a><br>
0453: * </p>
0454: * <p><a href="#Alarms">Example 8: Alarms</a><br>
0455: * </p>
0456: * <p><a href="#MultiColumnHeaders">Example 9: Multiple Column Headers and
0457: * Footers</a><br>
0458: * </p>
0459: * </div>
0460: * <span style="font-weight: bold; color: rgb(0, 0, 0);">Supporting
0461: * files:</span>
0462: * <div style="margin-left: 40px;">
0463: * <p style="color: rgb(0, 0, 0);"><a href="table.html#Example:_TableBean_">TableBean
0464: * backing bean in <code>ui:table</code> documentation<br>
0465: * </a></p>
0466: * <p><a href="table.html#UtilityClasses" style="color: rgb(0, 0, 0);">Utility
0467: * classes in <code>ui:table</code> documentation</a><a
0468: * href="table.html#UtilityClasses"><span style="color: rgb(0, 0, 0);"> </span><br>
0469: * </a></p>
0470: * </div>
0471: * <h3><a name="SortableTable"></a>Example 1: Sortable Table<br>
0472: * </h3>
0473: * <span style="text-decoration: line-through;"></span><span
0474: * style="color: rgb(0, 0, 0);">This example shows how to
0475: * implement table sorting, and uses the </span><a
0476: * href="table.html#Example:_TableBean_" style="color: rgb(0, 0, 0);">TableBean</a><span
0477: * style="color: rgb(0, 0, 0);"> and <a href="table.html#Name.java">Name.java</a>
0478: * code shown in the <code>ui:table</code> documentation. Notice that the
0479: * <code>ui:table</code>
0480: * tag includes the <code>clearSortButton</code> attribute to enable
0481: * users to clear any sorts applied to the table.<br>
0482: * <br>
0483: * The value binding objects that you assign to the <code>sort</code>
0484: * attribute in <code>ui:tableColumn</code> must be the proper data type
0485: * for sorting to work as expected. For example, you should not use String
0486: * objects for numeric data because the digits will be sorted according to
0487: * their ASCII values. Sorting the numbers as strings causes the number 2
0488: * to be displayed before the number 11, for example. Be sure to
0489: * sort using objects such as Number, Character, Date, Boolean, etc.</span><br
0490: * style="color: rgb(0, 0, 0);">
0491: * <br style="color: rgb(0, 0, 0);">
0492: * <span style="color: rgb(0, 0, 0);">You can use a FieldKey id or
0493: * value binding to define criteria for sorting the contents of
0494: * TableDataProvider. However, when sorting a column of checkboxes or
0495: * radio buttons, you must use a value binding because values are external
0496: * to the data (i.e., TableDataProvider does not contain FieldKey ids for
0497: * a selected checkbox value). <br>
0498: * <br>
0499: * User interface
0500: * guidelines recommend not setting a default initial sort. However, if
0501: * you want to set a default initial sort, you can do so by using the <code>addSort(SortCriteria)</code>
0502: * method of TableRowGroup. When the table is rendered, the data is sorted
0503: * and the primary sort column is highlighted. </span><br
0504: * style="color: rgb(0, 0, 0);">
0505: * <br style="color: rgb(102, 102, 204);">
0506: * <span style="color: rgb(102, 102, 204);"></span><code><!-- Sortable
0507: * Table --><br>
0508: * <ui:table id="table1" <br>
0509: * clearSortButton="true"<br>
0510: * sortPanelToggleButton="true"<br>
0511: * title="Sortable Table"><br>
0512: * <ui:tableRowGroup id="rowGroup1"<br>
0513: * sourceData="#{TableBean.groupB.names}"
0514: * sourceVar="name"><br>
0515: * <ui:tableColumn id="col1"<br>
0516: * alignKey="last"<br>
0517: * headerText="Last Name"<br>
0518: * rowHeader="true"<br>
0519: * sort="last"><br>
0520: * <ui:staticText
0521: * text="#{name.value.last}"/><br>
0522: * </ui:tableColumn><br>
0523: * <ui:tableColumn id="col2"<br>
0524: * alignKey="first"<br>
0525: * headerText="First Name"<br>
0526: * sort="first"><br>
0527: * <ui:staticText
0528: * text="#{name.value.first}"/><br>
0529: * </ui:tableColumn><br>
0530: * </ui:tableRowGroup><br>
0531: * </ui:table></code><br>
0532: * <h3><a name="SelectSingleRow"></a>Example 2: Select Single Row</h3>
0533: * <span style="text-decoration: line-through;"></span><span
0534: * style="color: rgb(0, 0, 0);">This example shows a column of
0535: * radioButton components that are used to select
0536: * a single table row. Dynamic row highlighting is set by invoking an
0537: * <code>initAllRows()</code> JavaScript function whenever the state of
0538: * the radio button
0539: * changes. The <code>initAllRows()</code>
0540: * function is defined in <a href="#select.js"><code>select.js</code>
0541: * shown below</a>. The
0542: * radio button state is maintained through the <code>selected</code>
0543: * attribute of the
0544: * <code>ui:tableRowGroup</code> tag. This example does not maintain state
0545: * across paginated
0546: * pages.</span><br style="color: rgb(0, 0, 0);">
0547: * <br style="color: rgb(0, 0, 0);">
0548: * <span style="color: rgb(0, 0, 0);">Note: UI guidelines recommend
0549: * that items should not remain selected when they cannot be seen by the
0550: * user. Using the
0551: * <code>com.sun.rave.web.ui.event.TableSelectPhaseListener</code> object
0552: * ensures that rows that are hidden from view are
0553: * deselected because the phase listener clears the selected state after
0554: * the
0555: * rendering phase. The <code>TableSelectPhaseListener</code>
0556: * object is used in this example in </span><a
0557: * href="table.html#Select.java" style="color: rgb(0, 0, 0);">Select.java
0558: * in the <code>ui:table</code> documentation</a><span
0559: * style="color: rgb(0, 0, 0);">. Also refer to the JavaDoc
0560: * for <code>TableSelectPhaseListener</code> for more information. </span><br
0561: * style="color: rgb(0, 0, 0);">
0562: * <br>
0563: * <code><!-- Single Select Row --><br>
0564: * <ui:table id="table1"<br>
0565: * deselectSingleButton="true"<br>
0566: * paginateButton="true"<br>
0567: * paginationControls="true"<br>
0568: * title="Select Single Row"><br>
0569: * <ui:tableRowGroup id="rowGroup1"<br>
0570: *
0571: * selected="#{TableBean.groupA.select.selectedState}"<br>
0572: * sourceData="#{TableBean.groupA.names}"<br>
0573: * sourceVar="name" rows="5"><br>
0574: * <ui:tableColumn id="col0"<br>
0575: *
0576: * onClick="setTimeout('initAllRows()', 0)"<br>
0577: * selectId="select"<br>
0578: *
0579: * sort="#{TableBean.groupA.select.selectedState}"><br>
0580: * <ui:radioButton id="select"<br>
0581: * name="select"<br>
0582: *
0583: * selected="#{TableBean.groupA.select.selected}"<br>
0584: *
0585: * selectedValue="#{TableBean.groupA.select.selectedValue}"/><br>
0586: * </ui:tableColumn><br>
0587: * <ui:tableColumn id="col1"<br>
0588: * alignKey="last"
0589: * headerText="Last Name" rowHeader="true"><br>
0590: * <ui:staticText
0591: * text="#{name.value.last}"/><br>
0592: * </ui:tableColumn><br>
0593: * <ui:tableColumn id="col2" alignKey="first"
0594: * headerText="First Name"><br>
0595: * <ui:staticText
0596: * text="#{name.value.first}"/><br>
0597: * </ui:tableColumn><br>
0598: * </ui:tableRowGroup><br>
0599: * </ui:table></code><br>
0600: * <br>
0601: * <span style="font-weight: bold;"><a name="select.js"></a>select.js</span><br>
0602: * <br>
0603: * This example shows the contents of the <code>select.js</code> file
0604: * used in the
0605: * example above.<br>
0606: * <br>
0607: * <code>// Use this function to initialize all rows displayed in the
0608: * table when the<br>
0609: * // state of selected components change (i.e., checkboxes or
0610: * radiobuttons used to<br>
0611: * // de/select rows of the table). This functionality requires the
0612: * selectId <br>
0613: * // property of the tableColumn component to be set.<br>
0614: * // <br>
0615: * // Note: Use setTimeout when invoking this function. This will ensure
0616: * that <br>
0617: * // checkboxes and radiobutton are selected immediately, instead of
0618: * waiting for <br>
0619: * // the onClick event to complete. For example: <br>
0620: * //<br>
0621: * // onClick="setTimeout('initAllRows(); disableActions()', 0)"<br>
0622: * function initAllRows() {<br>
0623: * // Disable table actions by default.<br>
0624: * var table = document.getElementById("form1:table1");<br>
0625: * table.initAllRows();<br>
0626: * }</code><br>
0627: * <h3><a name="SelectMultipleRows"></a>Example 3: Select Multiple Rows<br>
0628: * </h3>
0629: * <span style="text-decoration: line-through;"></span><span
0630: * style="color: rgb(0, 0, 0);">This example shows a column of
0631: * checkbox components that are used to select multiple table rows.
0632: * Dynamic row highlighting is set by
0633: * invoking an
0634: * <code>initAllRows()</code> JavaScript function whenever the state of
0635: * the checkbox
0636: * changes. The <code>initAllRows()</code>
0637: * function is defined in <a href="#select.js"><code>select.js </code>in
0638: * the previous example</a>. The checkbox state is maintained
0639: * through the <code>selected</code> attribute of the
0640: * <code>ui:tableRowGroup</code> tag. This example does not maintain state
0641: * across paginated
0642: * pages.</span><br style="color: rgb(0, 0, 0);">
0643: * <span style="color: rgb(0, 0, 0);"><br>
0644: * Note: UI guidelines recommend
0645: * that items should not remain selected when they cannot be seen by the
0646: * user. Using the
0647: * <code>com.sun.rave.web.ui.event.TableSelectPhaseListener</code> object
0648: * ensures that rows that are hidden from view are
0649: * deselected because the phase listener clears the selected state after
0650: * the
0651: * rendering phase. The <code>TableSelectPhaseListener</code>
0652: * object is used in this example in </span><a
0653: * href="table.html#Select.java" style="color: rgb(0, 0, 0);">Select.java</a><span
0654: * style="color: rgb(0, 0, 0);">,
0655: * shown in the </span><code style="color: rgb(0, 0, 0);">ui:table</code><span
0656: * style="color: rgb(0, 0, 0);"> documentation. Also refer to the
0657: * JavaDoc
0658: * for <code>TableSelectPhaseListener</code> for more information. </span><br>
0659: * <br>
0660: * <code><!-- Select Multiple Rows --><br>
0661: * <ui:table id="table1"<br>
0662: * deselectMultipleButton="true"<br>
0663: * selectMultipleButton="true"<br>
0664: * paginateButton="true"<br>
0665: * paginationControls="true"<br>
0666: * title="Select Multiple Rows"><br>
0667: * <ui:tableRowGroup id="rowGroup1"<br>
0668: *
0669: * selected="#{TableBean.groupA.select.selectedState}"<br>
0670: * sourceData="#{TableBean.groupA.names}"<br>
0671: * sourceVar="name" rows="5"><br>
0672: * <ui:tableColumn id="col0"<br>
0673: * selectId="select"
0674: * sort="#{TableBean.groupA.select.selectedState}"><br>
0675: * <ui:checkbox id="select"<br>
0676: *
0677: * onClick="setTimeout('initAllRows()', 0)"<br>
0678: *
0679: * selected="#{TableBean.groupA.select.selected}"<br>
0680: *
0681: * selectedValue="#{TableBean.groupA.select.selectedValue}"/><br>
0682: * </ui:tableColumn><br>
0683: * <ui:tableColumn id="col1"<br>
0684: * alignKey="last"
0685: * headerText="Last Name" rowHeader="true"><br>
0686: * <ui:staticText
0687: * text="#{name.value.last}"/><br>
0688: * </ui:tableColumn><br>
0689: * <ui:tableColumn id="col2" alignKey="first"
0690: * headerText="First Name"><br>
0691: * <ui:staticText
0692: * text="#{name.value.first}"/><br>
0693: * </ui:tableColumn><br>
0694: * </ui:tableRowGroup><br>
0695: * </ui:table></code><br>
0696: * <span style="text-decoration: line-through;"></span>
0697: * <h3><a name="HiddenSelectedRows"></a>Example 4: Hidden Selected Rows<br>
0698: * </h3>
0699: * <span style="text-decoration: line-through;"></span><span
0700: * style="color: rgb(0, 0, 0);">This example is the same as <a
0701: * href="#SelectMultipleRows">Example 3: Select Multiple Rows</a> except
0702: * that it maintains state across paginated pages, and shows how to deal
0703: * appropriately with the possibility of hiding rows that have been
0704: * selected. As in the previous example, the first column is a
0705: * column of checkboxes that can be used to select multiple rows. The
0706: * checkbox state is maintained through the <code>selected</code>
0707: * attribute of
0708: * the
0709: * <code>ui:tableRowGroup</code> tag. Dynamic row highlighting is
0710: * set by
0711: * invoking an
0712: * <code>initAllRows()</code> JavaScript function whenever the state of
0713: * the checkbox
0714: * changes. The <code>initAllRows()</code>
0715: * function is defined in <a href="tableColumn.html#select.js"><code>select.js
0716: * </code>in the previous example</a>. </span><br
0717: * style="color: rgb(0, 0, 0);">
0718: * <br style="color: rgb(0, 0, 0);">
0719: * <span style="color: rgb(0, 0, 0);">If your table must maintain state,
0720: * you must set the <code>hiddenSelectedRows</code> attribute to true in
0721: * the <code>ui:table</code> tag as shown in this example. The attribute
0722: * causes text to be
0723: * displayed in the table title and footer to indicate the number of
0724: * selected rows that are currently hidden from view. See the </span><a
0725: * href="table.html#Select.java" style="color: rgb(0, 0, 0);">Select.java</a><span
0726: * style="color: rgb(0, 0, 0);">
0727: * </span><span style="color: rgb(102, 102, 204);"><span
0728: * style="color: rgb(0, 0, 0);">utility class in the </span><code
0729: * style="color: rgb(0, 0, 0);">ui:table</code><span
0730: * style="color: rgb(0, 0, 0);">
0731: * documentation.</span></span><br>
0732: * <br>
0733: * <code></code><span
0734: * style="font-weight: bold; text-decoration: line-through;"></span><code><!--
0735: * Hidden Selected Rows --><br>
0736: * <ui:table id="table1"<br>
0737: * deselectMultipleButton="true"<br>
0738: *
0739: * deselectMultipleButtonOnClick="setTimeout('disableActions()', 0)"<br>
0740: * hiddenSelectedRows="true"<br>
0741: * paginateButton="true"<br>
0742: * paginationControls="true"<br>
0743: * selectMultipleButton="true"<br>
0744: *
0745: * selectMultipleButtonOnClick="setTimeout('disableActions()', 0)"<br>
0746: * title="Hidden Selected Rows"><br>
0747: * <ui:tableRowGroup id="rowGroup1"<br>
0748: *
0749: * binding="#{TableBean.groupA.tableRowGroup}"<br>
0750: *
0751: * selected="#{TableBean.groupA.select.selectedState}"<br>
0752: * sourceData="#{TableBean.groupA.names}"<br>
0753: * sourceVar="name" rows="5"><br>
0754: * <ui:tableColumn id="col0"<br>
0755: * selectId="select"<br>
0756: *
0757: * sort="#{TableBean.groupA.select.selectedState}"><br>
0758: * <ui:checkbox id="select"<br>
0759: *
0760: * binding="#{TableBean.groupA.checkbox}"<br>
0761: *
0762: * onClick="setTimeout('initAllRows(); disableActions()', 0)"<br>
0763: *
0764: * selected="#{TableBean.groupA.select.selected}"<br>
0765: *
0766: * selectedValue="#{TableBean.groupA.select.selectedValue}"/><br>
0767: * </ui:tableColumn><br>
0768: * <ui:tableColumn id="col1"<br>
0769: * alignKey="last"
0770: * headerText="Last Name" rowHeader="true"><br>
0771: * <ui:staticText
0772: * text="#{name.value.last}"/><br>
0773: * </ui:tableColumn><br>
0774: * <ui:tableColumn id="col2" alignKey="first"
0775: * headerText="First Name"><br>
0776: * <ui:staticText
0777: * text="#{name.value.first}"/><br>
0778: * </ui:tableColumn><br>
0779: * </ui:tableRowGroup><br>
0780: * <br>
0781: * <!-- Actions (Top) --><br>
0782: * <f:facet name="actionsTop"><br>
0783: * <f:subview id="actionsTop"><br>
0784: * <jsp:include
0785: * page="actionsTop.jsp"/><br>
0786: * </f:subview><br>
0787: * </f:facet><br>
0788: * <br>
0789: * <!-- Actions (Bottom) --><br>
0790: * <f:facet name="actionsBottom"><br>
0791: * <f:subview id="actionsBottom"><br>
0792: * <jsp:include
0793: * page="actionsBottom.jsp"/><br>
0794: * </f:subview><br>
0795: * </f:facet><br>
0796: * </ui:table></code><br>
0797: * <h3><a name="SpacerColumn"></a>Example 5: Spacer Column<br>
0798: * </h3>
0799: * <span style="color: rgb(0, 0, 0);">This example shows how to
0800: * create a blank column to use for spacing in a table. The spacer column
0801: * is especially useful in two-column tables. A property table, which is
0802: * used to display properties for a single object, typically includes two
0803: * data columns. The
0804: * first column identifies the properties of the object, and the second
0805: * column displays the values for each of the properties. Because tables
0806: * created with the <code>ui:table</code> tag expand to the width of the
0807: * browser window, the two data columns might become so wide that the
0808: * properties and their values are not close together, and readability is
0809: * reduced. To solve this problem, you can add a spacer column to one side
0810: * of the table.<br>
0811: * <br>
0812: * In the example, the third column includes the <code>spacerColumn</code>
0813: * attribute set to true, and the <code>width </code>attribute set to
0814: * 70%. The column has no header or footer text, and no data. This column
0815: * acts to always keep
0816: * the data
0817: * of the first two columns in close proximity. If a column header
0818: * and footer are required, provide an empty string for the <code>headerText</code>
0819: * and
0820: * <code>footerText</code> attributes. Set the width attribute to a value
0821: * that achieves the desired spacing. </span><br>
0822: * <br>
0823: * <code><!-- Spacer Column --><br>
0824: * <ui:table id="table1" title="Spacer Column"><br>
0825: * <ui:tableRowGroup id="rowGroup1" <br>
0826: * sourceData="#{TableBean.groupB.names}"
0827: * sourceVar="name"><br>
0828: * <ui:tableColumn id="col1"<br>
0829: * alignKey="last"<br>
0830: * footerText="Column Footer"<br>
0831: * headerText="Last Name"<br>
0832: * rowHeader="true"><br>
0833: * <ui:staticText
0834: * text="#{name.value.last}"/><br>
0835: * </ui:tableColumn><br>
0836: * <ui:tableColumn id="col2"<br>
0837: * alignKey="first"<br>
0838: * footerText="Column Footer"<br>
0839: * headerText="First Name"><br>
0840: * <ui:staticText
0841: * text="#{name.value.first}"/><br>
0842: * </ui:tableColumn><br>
0843: * <ui:tableColumn id="col3" spacerColumn="true"
0844: * width="70%"/><br>
0845: * </ui:tableRowGroup><br>
0846: * </ui:table></code><br>
0847: * <h3><a name="EmptyCells"></a>Example 6: Empty Cells<br>
0848: * </h3>
0849: * <span style="text-decoration: line-through;"></span><span
0850: * style="color: rgb(0, 0, 0);">This example shows how to
0851: * display a theme-specific icon that indicates an empty cell, when
0852: * the content of a table cell is not applicable or is unexpectedly empty.
0853: * UI guidelines
0854: * suggest that the empty cell icon should not be used for a value that is
0855: * truly null, such as an
0856: * empty alarm cell or a comment field that is blank. In addition, the
0857: * icon should not be used for cells that
0858: * contain user interface elements such as checkboxes or drop-down lists
0859: * when these elements are not applicable. Instead, the elements should
0860: * not be displayed so the cell is left empty.</span><br
0861: * style="color: rgb(0, 0, 0);">
0862: * <br style="color: rgb(0, 0, 0);">
0863: * <span style="color: rgb(0, 0, 0);">In this example, the <code>emptyCell
0864: * </code>attribute is set to
0865: * an expression that evaluates to true in every fifth row. In your
0866: * application, it is up to you to decide how to
0867: * test if the cell is truly empty. For example, you could use this
0868: * syntax: <code>emptyCell="#{name.value.last == null}"</code></span><br
0869: * style="color: rgb(0, 0, 0);">
0870: * <code style="color: rgb(102, 102, 204);"></code><code><br>
0871: * <!-- Empty Cells --><br>
0872: * <ui:table id="table1" title="Empty Cells"><br>
0873: * <ui:tableRowGroup id="rowGroup1"<br>
0874: *
0875: * selected="#{TableBean.groupB.select.selectedState}"<br>
0876: * sourceData="#{TableBean.groupB.names}"<br>
0877: * sourceVar="name" rows="5"><br>
0878: * <ui:tableColumn id="col0"<br>
0879: *
0880: * emptyCell="#{name.tableRow.rowId % 5 == 0}"<br>
0881: * selectId="select"><br>
0882: * <ui:checkbox id="select"<br>
0883: *
0884: * onClick="setTimeout('initAllRows()', 0)"<br>
0885: *
0886: * selected="#{TableBean.groupB.select.selected}"<br>
0887: *
0888: * selectedValue="#{TableBean.groupB.select.selectedValue}"/><br>
0889: * </ui:tableColumn><br>
0890: * <ui:tableColumn id="col1"<br>
0891: *
0892: * emptyCell="#{name.tableRow.rowId % 5 == 0}"<br>
0893: * alignKey="last"<br>
0894: * headerText="Last Name"<br>
0895: * rowHeader="true"><br>
0896: * <ui:staticText
0897: * text="#{name.value.last}"/><br>
0898: * </ui:tableColumn><br>
0899: * <ui:tableColumn id="col2"<br>
0900: *
0901: * emptyCell="#{name.tableRow.rowId % 5 == 0}"<br>
0902: * alignKey="first" <br>
0903: * headerText="First Name"><br>
0904: * <ui:staticText
0905: * text="#{name.value.first}"/><br>
0906: * </ui:tableColumn><br>
0907: * </ui:tableRowGroup><br>
0908: * </ui:table></code><br>
0909: * <h3><a name="EmbeddedActions"></a>Example 7: Embedded Actions<br>
0910: * </h3>
0911: * <span style="color: rgb(0, 0, 0);">This example shows how to add
0912: * embedded actions to a table. If the
0913: * </span><code style="color: rgb(0, 0, 0);">ui:tableColumn</code><span
0914: * style="color: rgb(0, 0, 0);"> tag contains more than one tag
0915: * such as </span><code style="color: rgb(0, 0, 0);"></code><code
0916: * style="color: rgb(0, 0, 0);">ui:hyperlink</code><span
0917: * style="color: rgb(0, 0, 0);"> that a</span><code
0918: * style="color: rgb(0, 0, 0);"></code><span style="color: rgb(0, 0, 0);">re
0919: * used as embedded actions, you
0920: * should set the <code>ui:tableColumn</code> tag's </span><code
0921: * style="color: rgb(0, 0, 0);">embeddedActions </code><span
0922: * style="color: rgb(0, 0, 0);">attribute to
0923: * true. This attribute causes an action separator image to be displayed
0924: * between each of the rendered hyperlinks, as recommended in UI
0925: * guidelines.</span><br style="color: rgb(0, 0, 0);">
0926: * <br>
0927: * <code><!-- Embedded Actions --><br>
0928: * <ui:table id="table1" title="Embedded Actions"><br>
0929: * <ui:tableRowGroup id="rowGroup1"<br>
0930: * sourceData="#{TableBean.groupB.names}"
0931: * sourceVar="name"><br>
0932: * <ui:tableColumn id="col0" embeddedActions="true"
0933: * headerText="Actions"><br>
0934: * <ui:hyperlink id="action1"<br>
0935: *
0936: * action="#{TableBean.groupB.actions.action}"<br>
0937: * text="Action
0938: * 1"><br>
0939: * <f:param name="param"
0940: * value="#{name.value.last}"/><br>
0941: * </ui:hyperlink><br>
0942: * <ui:hyperlink id="action2"<br>
0943: *
0944: * action="#{TableBean.groupB.actions.action}"<br>
0945: * text="Action
0946: * 2"><br>
0947: * <f:param name="param"
0948: * value="#{name.tableRow.rowId}"/><br>
0949: * </ui:hyperlink><br>
0950: * </ui:tableColumn><br>
0951: * <ui:tableColumn id="col1"<br>
0952: * alignKey="last"
0953: * headerText="Last Name" rowHeader="true"><br>
0954: * <ui:staticText
0955: * text="#{name.value.last}"/><br>
0956: * </ui:tableColumn><br>
0957: * <ui:tableColumn id="col2" alignKey="first"
0958: * headerText="First Name"><br>
0959: * <ui:staticText
0960: * text="#{name.value.first}"/><br>
0961: * </ui:tableColumn><br>
0962: * </ui:tableRowGroup><br>
0963: * </ui:table></code><br>
0964: * <h3><a name="Alarms"></a>Example 8: Alarms<br>
0965: * </h3>
0966: * <span style="text-decoration: line-through;"></span><span
0967: * style="color: rgb(0, 0, 0);">This example shows how to add
0968: * alarms to table data cells. The second </span><code
0969: * style="color: rgb(0, 0, 0);">ui:tableColumn</code><span
0970: * style="color: rgb(0, 0, 0);"> tag includes a </span><code
0971: * style="color: rgb(0, 0, 0);">ui:alarm</code><span
0972: * style="color: rgb(0, 0, 0);"> tag to render the alarm icon. The </span><code
0973: * style="color: rgb(0, 0, 0);">ui:tableColumn</code><span
0974: * style="color: rgb(0, 0, 0);"> tag's </span><code
0975: * style="color: rgb(0, 0, 0);">severity</code><span
0976: * style="color: rgb(0, 0, 0);"> attribute is set to true, which
0977: * causes the
0978: * table data cell to appear highlighted according to level of
0979: * severity.
0980: * Note also that the column
0981: * is set to sort on the severity of the alarms. See
0982: * the <a href="table.html#Example:_TableBean_">TableBean</a>
0983: * backing bean
0984: * and </span><a style="color: rgb(0, 0, 0);"
0985: * href="table.html#Name.java">Name.java</a><span
0986: * style="color: rgb(0, 0, 0);"> utlity class example in the </span><code
0987: * style="color: rgb(0, 0, 0);">ui:table</code><span
0988: * style="color: rgb(0, 0, 0);"> documentation for the model data. </span><br
0989: * style="color: rgb(255, 153, 0);">
0990: * <br>
0991: * <code><!-- Alarms --><br>
0992: * <ui:table id="table1" title="Alarms"><br>
0993: * <ui:tableRowGroup id="rowGroup1" <br>
0994: * sourceData="#{TableBean.groupB.names}"
0995: * sourceVar="name"><br>
0996: * <ui:tableColumn id="col1"<br>
0997: * alignKey="last"<br>
0998: * headerText="Last Name"<br>
0999: * rowHeader="true"<br>
1000: * sort="last"><br>
1001: * <ui:staticText
1002: * text="#{name.value.last}"/><br>
1003: * </ui:tableColumn><br>
1004: * <ui:tableColumn id="col2"<br>
1005: * alignKey="first"<br>
1006: * headerText="First Name"<br>
1007: *
1008: * severity="#{name.value.severity}"<br>
1009: * sort="alarm"><br>
1010: * <ui:alarm id="alarm"
1011: * severity="#{name.value.severity}"/> <br>
1012: * <ui:staticText
1013: * text="#{name.value.first}"/><br>
1014: * </ui:tableColumn><br>
1015: * </ui:tableRowGroup><br>
1016: * </ui:table></code><br>
1017: * <h3><a name="MultiColumnHeaders"></a>Example 9: Multiple Column Headers
1018: * & Footers<br>
1019: * </h3>
1020: * This example shows how to use nested tableColumn components to create
1021: * multiple headers and footers. The column header of the parent
1022: * tableColumn component will span the nested tableColumn children. Not
1023: * all attributes are supported in this configuration. Typically, only the
1024: * header, footer, tableFooter, and sort would apply to a header and
1025: * spaning multuple columns. Sorting is supported, but is recommended only
1026: * for tableColumn children. Further, nesting tableColumn components will
1027: * render; however, the styles used here support one level of nexting.<br>
1028: * <br>
1029: * <span style="color: rgb(0, 0, 0);">This example shows how to use
1030: * nested <code>ui:tableColumn</code> tags to create
1031: * multiple headers and footers. The third <code>ui:tableColumn</code>
1032: * (col3) contains four nested columns col3a, col3b, col3c, and col3d. The
1033: * column header specified in col3 spans the four nested columns.
1034: * However, not
1035: * all <code>ui:tableColumn</code></span><span
1036: * style="color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);">
1037: * attributes are supported when the
1038: * tags are nested. Typically, only the
1039: * header, footer, tableFooter, and sort would apply to a header and
1040: * spaning multiple columns. Sorting in the parent tableColumn is
1041: * supported, but for usability, sorting is recommended only for
1042: * tableColumn children. In addition, nesting of more than one level of
1043: * tableColumn components will render, but the CSS styles only support one
1044: * level of nesting. </span>
1045: * <br style="color: rgb(0, 0, 0);">
1046: * </span><br>
1047: * <code><!-- Multiple Headers &amp; Footers --><br>
1048: * <ui:table id="table1"<br>
1049: * clearSortButton="true"<br>
1050: * deselectMultipleButton="true"<br>
1051: *
1052: * deselectMultipleButtonOnClick="setTimeout('disableActions()', 0)"<br>
1053: * footerText="Table Footer"<br>
1054: * paginateButton="true"<br>
1055: * paginationControls="true"<br>
1056: * selectMultipleButton="true"<br>
1057: *
1058: * selectMultipleButtonOnClick="setTimeout('disableActions()', 0)"<br>
1059: * sortPanelToggleButton="true"<br>
1060: * title="Multiple Headers &amp; Footers"><br>
1061: * <ui:tableRowGroup id="rowGroup1"<br>
1062: *
1063: * binding="#{TableBean.groupA.tableRowGroup}"<br>
1064: *
1065: * rows="#{TableBean.groupA.preferences.rows}"<br>
1066: *
1067: * selected="#{TableBean.groupA.select.selectedState}"<br>
1068: * sourceData="#{TableBean.groupA.names}"<br>
1069: * sourceVar="name"><br>
1070: * <ui:tableColumn id="col0"<br>
1071: * selectId="select"<br>
1072: *
1073: * sort="#{TableBean.groupA.select.selectedState}"><br>
1074: * <ui:checkbox id="select"<br>
1075: *
1076: * onClick="setTimeout('initAllRows(); disableActions()', 0)"<br>
1077: *
1078: * selected="#{TableBean.groupA.select.selected}"<br>
1079: *
1080: * selectedValue="#{TableBean.groupA.select.selectedValue}"/><br>
1081: * </ui:tableColumn><br>
1082: * <ui:tableColumn id="col1"<br>
1083: * alignKey="last"<br>
1084: * headerText="Last Name"<br>
1085: * rowHeader="true"><br>
1086: * <ui:staticText
1087: * text="#{name.value.last}"/><br>
1088: * </ui:tableColumn><br>
1089: * <ui:tableColumn id="col2"<br>
1090: * alignKey="first"
1091: * headerText="First Name"><br>
1092: * <ui:staticText
1093: * text="#{name.value.first}"/><br>
1094: * </ui:tableColumn><br>
1095: * <ui:tableColumn id="col3" headerText="Task
1096: * Status"><br>
1097: * <br>
1098: * <!-- Nested Columns --><br>
1099: * <ui:tableColumn id="col3a"<br>
1100: * headerText="A"<br>
1101: *
1102: * footerText="ColFtrA"<br>
1103: * sort="last"<br>
1104: *
1105: * sortIcon="ALARM_CRITICAL_MEDIUM"<br>
1106: *
1107: * tableFooterText="TblFtrA"><br>
1108: * <ui:staticText
1109: * text="a"/><br>
1110: * </ui:tableColumn><br>
1111: * <ui:tableColumn id="col3b"<br>
1112: * headerText="B"<br>
1113: *
1114: * footerText="ColFtrB"<br>
1115: * sort="first"<br>
1116: *
1117: * sortIcon="ALARM_MAJOR_MEDIUM"<br>
1118: *
1119: * tableFooterText="TblFtrB"><br>
1120: * <ui:staticText
1121: * text="b"/><br>
1122: * </ui:tableColumn><br>
1123: * <ui:tableColumn id="col3c"<br>
1124: * headerText="C"<br>
1125: *
1126: * footerText="ColFtrC"<br>
1127: *
1128: * sortIcon="ALARM_MINOR_MEDIUM"<br>
1129: *
1130: * tableFooterText="TblFtrC"><br>
1131: * <ui:staticText
1132: * text="c"/><br>
1133: * </ui:tableColumn><br>
1134: * <ui:tableColumn id="col3d"<br>
1135: * headerText="D"<br>
1136: *
1137: * footerText="ColFtrD"<br>
1138: *
1139: * sortIcon="ALARM_DOWN_MEDIUM"<br>
1140: *
1141: * tableFooterText="TblFtrD"><br>
1142: * <ui:staticText
1143: * text="d"/><br>
1144: * </ui:tableColumn><br>
1145: * </ui:tableColumn><br>
1146: * </ui:tableRowGroup><br>
1147: * </ui:table></code><span style="font-family: monospace;"></span><br>
1148: * <h3 style="color: rgb(0, 0, 0);">faces_config.xml Entry for
1149: * Managed Beans</h3>
1150: * <span style="color: rgb(0, 0, 0);">The examples use the <a
1151: * href="table.html#Example:_TableBean_">TableBean</a>
1152: * managed bean, which requires the following entry to be added to the </span><code
1153: * style="color: rgb(0, 0, 0);">faces_config.xml</code><span
1154: * style="color: rgb(0, 0, 0);"> file. </span><br>
1155: * <br>
1156: * <code><!DOCTYPE faces-config PUBLIC <br>
1157: * '-//Sun Microsystems, Inc.//DTD JavaServer Faces
1158: * Config 1.0//EN' <br>
1159: * 'http://java.sun.com/dtd/web-facesconfig_1_1.dtd'><br>
1160: * <br>
1161: * <faces-config><br>
1162: * <managed-bean><br>
1163: * <description>The
1164: * backing bean for the table example</description><br>
1165: *
1166: * <managed-bean-name>TableBean</managed-bean-name><br>
1167: *
1168: * <managed-bean-class>table.TableBean</managed-bean-class><br>
1169: *
1170: * <managed-bean-scope>session</managed-bean-scope><br>
1171: * </managed-bean><br>
1172: * </faces-config></code>
1173: * <br>
1174: * <p>Auto-generated component class.
1175: * Do <strong>NOT</strong> modify; all changes
1176: * <strong>will</strong> be lost!</p>
1177: */
1178:
1179: public abstract class TableColumnBase extends
1180: javax.faces.component.UIComponentBase {
1181:
1182: /**
1183: * <p>Construct a new <code>TableColumnBase</code>.</p>
1184: */
1185: public TableColumnBase() {
1186: super ();
1187: setRendererType("com.sun.rave.web.ui.TableColumn");
1188: }
1189:
1190: /**
1191: * <p>Return the identifier of the component family to which this
1192: * component belongs. This identifier, in conjunction with the value
1193: * of the <code>rendererType</code> property, may be used to select
1194: * the appropriate {@link Renderer} for this component instance.</p>
1195: */
1196: public String getFamily() {
1197: return "com.sun.rave.web.ui.TableColumn";
1198: }
1199:
1200: // abbr
1201: private String abbr = null;
1202:
1203: /**
1204: * <p>An abbreviated version of the cell's content</p>
1205: */
1206: public String getAbbr() {
1207: if (this .abbr != null) {
1208: return this .abbr;
1209: }
1210: ValueBinding _vb = getValueBinding("abbr");
1211: if (_vb != null) {
1212: return (String) _vb.getValue(getFacesContext());
1213: }
1214: return null;
1215: }
1216:
1217: /**
1218: * <p>An abbreviated version of the cell's content</p>
1219: * @see #getAbbr()
1220: */
1221: public void setAbbr(String abbr) {
1222: this .abbr = abbr;
1223: }
1224:
1225: // align
1226: private String align = null;
1227:
1228: /**
1229: * <p>Sets the horizontal alignment (left, right, justify, center) for the cell contents</p>
1230: */
1231: public String getAlign() {
1232: if (this .align != null) {
1233: return this .align;
1234: }
1235: ValueBinding _vb = getValueBinding("align");
1236: if (_vb != null) {
1237: return (String) _vb.getValue(getFacesContext());
1238: }
1239: return null;
1240: }
1241:
1242: /**
1243: * <p>Sets the horizontal alignment (left, right, justify, center) for the cell contents</p>
1244: * @see #getAlign()
1245: */
1246: public void setAlign(String align) {
1247: this .align = align;
1248: }
1249:
1250: // alignKey
1251: private Object alignKey = null;
1252:
1253: /**
1254: * <p>Use the <code>alignKey</code> attribute to specify the FieldKey id or FieldKey
1255: * to be used as an identifier for a specific data element on which to align the
1256: * table cell data in the column. If <code>alignKey</code> specifies a
1257: * FieldKey, the FieldKey is used as is; otherwise, a FieldKey is created using
1258: * the <code>alignKey</code> value that you specify. Alignment is based on
1259: * the object type of the data element. For example, Date and Number objects are
1260: * aligned "right", Character and String objects are aligned "left", and Boolean
1261: * objects are aligned "center". All columns, including select columns, are
1262: * aligned "left" by default. Note that the align property overrides this value.</p>
1263: */
1264: public Object getAlignKey() {
1265: if (this .alignKey != null) {
1266: return this .alignKey;
1267: }
1268: ValueBinding _vb = getValueBinding("alignKey");
1269: if (_vb != null) {
1270: return (Object) _vb.getValue(getFacesContext());
1271: }
1272: return null;
1273: }
1274:
1275: /**
1276: * <p>Use the <code>alignKey</code> attribute to specify the FieldKey id or FieldKey
1277: * to be used as an identifier for a specific data element on which to align the
1278: * table cell data in the column. If <code>alignKey</code> specifies a
1279: * FieldKey, the FieldKey is used as is; otherwise, a FieldKey is created using
1280: * the <code>alignKey</code> value that you specify. Alignment is based on
1281: * the object type of the data element. For example, Date and Number objects are
1282: * aligned "right", Character and String objects are aligned "left", and Boolean
1283: * objects are aligned "center". All columns, including select columns, are
1284: * aligned "left" by default. Note that the align property overrides this value.</p>
1285: * @see #getAlignKey()
1286: */
1287: public void setAlignKey(Object alignKey) {
1288: this .alignKey = alignKey;
1289: }
1290:
1291: // axis
1292: private String axis = null;
1293:
1294: /**
1295: * <p>Provides a method for categorizing cells</p>
1296: */
1297: public String getAxis() {
1298: if (this .axis != null) {
1299: return this .axis;
1300: }
1301: ValueBinding _vb = getValueBinding("axis");
1302: if (_vb != null) {
1303: return (String) _vb.getValue(getFacesContext());
1304: }
1305: return null;
1306: }
1307:
1308: /**
1309: * <p>Provides a method for categorizing cells</p>
1310: * @see #getAxis()
1311: */
1312: public void setAxis(String axis) {
1313: this .axis = axis;
1314: }
1315:
1316: // bgColor
1317: private String bgColor = null;
1318:
1319: public String getBgColor() {
1320: if (this .bgColor != null) {
1321: return this .bgColor;
1322: }
1323: ValueBinding _vb = getValueBinding("bgColor");
1324: if (_vb != null) {
1325: return (String) _vb.getValue(getFacesContext());
1326: }
1327: return null;
1328: }
1329:
1330: public void setBgColor(String bgColor) {
1331: this .bgColor = bgColor;
1332: }
1333:
1334: // char
1335: private String _char = null;
1336:
1337: public String getChar() {
1338: if (this ._char != null) {
1339: return this ._char;
1340: }
1341: ValueBinding _vb = getValueBinding("char");
1342: if (_vb != null) {
1343: return (String) _vb.getValue(getFacesContext());
1344: }
1345: return null;
1346: }
1347:
1348: public void setChar(String _char) {
1349: this ._char = _char;
1350: }
1351:
1352: // charOff
1353: private String charOff = null;
1354:
1355: public String getCharOff() {
1356: if (this .charOff != null) {
1357: return this .charOff;
1358: }
1359: ValueBinding _vb = getValueBinding("charOff");
1360: if (_vb != null) {
1361: return (String) _vb.getValue(getFacesContext());
1362: }
1363: return null;
1364: }
1365:
1366: public void setCharOff(String charOff) {
1367: this .charOff = charOff;
1368: }
1369:
1370: // colSpan
1371: private int colSpan = Integer.MIN_VALUE;
1372: private boolean colSpan_set = false;
1373:
1374: /**
1375: * <p>The number of columns spanned by a cell</p>
1376: */
1377: public int getColSpan() {
1378: if (this .colSpan_set) {
1379: return this .colSpan;
1380: }
1381: ValueBinding _vb = getValueBinding("colSpan");
1382: if (_vb != null) {
1383: Object _result = _vb.getValue(getFacesContext());
1384: if (_result == null) {
1385: return Integer.MIN_VALUE;
1386: } else {
1387: return ((Integer) _result).intValue();
1388: }
1389: }
1390: return Integer.MIN_VALUE;
1391: }
1392:
1393: /**
1394: * <p>The number of columns spanned by a cell</p>
1395: * @see #getColSpan()
1396: */
1397: public void setColSpan(int colSpan) {
1398: this .colSpan = colSpan;
1399: this .colSpan_set = true;
1400: }
1401:
1402: // descending
1403: private boolean descending = false;
1404: private boolean descending_set = false;
1405:
1406: /**
1407: * <p>Use the <code>descending</code> attribute to specify that the first
1408: * user-applied sort is descending. By default, the first time a user clicks a
1409: * column's sort button or column header, the sort is ascending. Note that this
1410: * not an initial sort. The data is initially displayed unsorted.</p>
1411: */
1412: public boolean isDescending() {
1413: if (this .descending_set) {
1414: return this .descending;
1415: }
1416: ValueBinding _vb = getValueBinding("descending");
1417: if (_vb != null) {
1418: Object _result = _vb.getValue(getFacesContext());
1419: if (_result == null) {
1420: return false;
1421: } else {
1422: return ((Boolean) _result).booleanValue();
1423: }
1424: }
1425: return false;
1426: }
1427:
1428: /**
1429: * <p>Use the <code>descending</code> attribute to specify that the first
1430: * user-applied sort is descending. By default, the first time a user clicks a
1431: * column's sort button or column header, the sort is ascending. Note that this
1432: * not an initial sort. The data is initially displayed unsorted.</p>
1433: * @see #isDescending()
1434: */
1435: public void setDescending(boolean descending) {
1436: this .descending = descending;
1437: this .descending_set = true;
1438: }
1439:
1440: // embeddedActions
1441: private boolean embeddedActions = false;
1442: private boolean embeddedActions_set = false;
1443:
1444: /**
1445: * <p>Set the <code>embeddedActions</code> attribute to true when the column includes
1446: * more than one embedded action. This attribute causes a separator image to be
1447: * displayed between the action links. This attribute is overridden by the
1448: * <code>emptyCell</code> attribute.</p>
1449: */
1450: public boolean isEmbeddedActions() {
1451: if (this .embeddedActions_set) {
1452: return this .embeddedActions;
1453: }
1454: ValueBinding _vb = getValueBinding("embeddedActions");
1455: if (_vb != null) {
1456: Object _result = _vb.getValue(getFacesContext());
1457: if (_result == null) {
1458: return false;
1459: } else {
1460: return ((Boolean) _result).booleanValue();
1461: }
1462: }
1463: return false;
1464: }
1465:
1466: /**
1467: * <p>Set the <code>embeddedActions</code> attribute to true when the column includes
1468: * more than one embedded action. This attribute causes a separator image to be
1469: * displayed between the action links. This attribute is overridden by the
1470: * <code>emptyCell</code> attribute.</p>
1471: * @see #isEmbeddedActions()
1472: */
1473: public void setEmbeddedActions(boolean embeddedActions) {
1474: this .embeddedActions = embeddedActions;
1475: this .embeddedActions_set = true;
1476: }
1477:
1478: // emptyCell
1479: private boolean emptyCell = false;
1480: private boolean emptyCell_set = false;
1481:
1482: /**
1483: * <p>Use the <code>emptyCell</code> attribute to cause a theme-specific image to be
1484: * displayed when the content of a table cell is not applicable or is unexpectedly
1485: * empty. You should not use this attribute for a value that is truly null, such
1486: * as an empty alarm cell or a comment field that is blank. In addition, the image
1487: * should not be used for cells that contain user interface elements such as
1488: * checkboxes or drop-down lists when these elements are not applicable. Instead,
1489: * the elements should simply not be displayed so the cell is left empty.</p>
1490: */
1491: public boolean isEmptyCell() {
1492: if (this .emptyCell_set) {
1493: return this .emptyCell;
1494: }
1495: ValueBinding _vb = getValueBinding("emptyCell");
1496: if (_vb != null) {
1497: Object _result = _vb.getValue(getFacesContext());
1498: if (_result == null) {
1499: return false;
1500: } else {
1501: return ((Boolean) _result).booleanValue();
1502: }
1503: }
1504: return false;
1505: }
1506:
1507: /**
1508: * <p>Use the <code>emptyCell</code> attribute to cause a theme-specific image to be
1509: * displayed when the content of a table cell is not applicable or is unexpectedly
1510: * empty. You should not use this attribute for a value that is truly null, such
1511: * as an empty alarm cell or a comment field that is blank. In addition, the image
1512: * should not be used for cells that contain user interface elements such as
1513: * checkboxes or drop-down lists when these elements are not applicable. Instead,
1514: * the elements should simply not be displayed so the cell is left empty.</p>
1515: * @see #isEmptyCell()
1516: */
1517: public void setEmptyCell(boolean emptyCell) {
1518: this .emptyCell = emptyCell;
1519: this .emptyCell_set = true;
1520: }
1521:
1522: // extraFooterHtml
1523: private String extraFooterHtml = null;
1524:
1525: /**
1526: * <p>Extra HTML code to be appended to the <code><td></code> HTML element that
1527: * is rendered for the column footer. Use only code that is valid in an HTML
1528: * <code><td></code> element. The code you specify is inserted in the HTML
1529: * element, and is not checked for validity. For example, you might set this
1530: * attribute to <code>"nowrap=`nowrap'"</code>.</p>
1531: */
1532: public String getExtraFooterHtml() {
1533: if (this .extraFooterHtml != null) {
1534: return this .extraFooterHtml;
1535: }
1536: ValueBinding _vb = getValueBinding("extraFooterHtml");
1537: if (_vb != null) {
1538: return (String) _vb.getValue(getFacesContext());
1539: }
1540: return null;
1541: }
1542:
1543: /**
1544: * <p>Extra HTML code to be appended to the <code><td></code> HTML element that
1545: * is rendered for the column footer. Use only code that is valid in an HTML
1546: * <code><td></code> element. The code you specify is inserted in the HTML
1547: * element, and is not checked for validity. For example, you might set this
1548: * attribute to <code>"nowrap=`nowrap'"</code>.</p>
1549: * @see #getExtraFooterHtml()
1550: */
1551: public void setExtraFooterHtml(String extraFooterHtml) {
1552: this .extraFooterHtml = extraFooterHtml;
1553: }
1554:
1555: // extraHeaderHtml
1556: private String extraHeaderHtml = null;
1557:
1558: /**
1559: * <p>Extra HTML code to be appended to the <code><th></code> HTML element that
1560: * is rendered for the column header. Use only code that is valid in an HTML
1561: * <code><td></code> element. The code you specify is inserted in the HTML
1562: * element, and is not checked for validity. For example, you might set this
1563: * attribute to <code>"nowrap=`nowrap'"</code>.</p>
1564: */
1565: public String getExtraHeaderHtml() {
1566: if (this .extraHeaderHtml != null) {
1567: return this .extraHeaderHtml;
1568: }
1569: ValueBinding _vb = getValueBinding("extraHeaderHtml");
1570: if (_vb != null) {
1571: return (String) _vb.getValue(getFacesContext());
1572: }
1573: return null;
1574: }
1575:
1576: /**
1577: * <p>Extra HTML code to be appended to the <code><th></code> HTML element that
1578: * is rendered for the column header. Use only code that is valid in an HTML
1579: * <code><td></code> element. The code you specify is inserted in the HTML
1580: * element, and is not checked for validity. For example, you might set this
1581: * attribute to <code>"nowrap=`nowrap'"</code>.</p>
1582: * @see #getExtraHeaderHtml()
1583: */
1584: public void setExtraHeaderHtml(String extraHeaderHtml) {
1585: this .extraHeaderHtml = extraHeaderHtml;
1586: }
1587:
1588: // extraTableFooterHtml
1589: private String extraTableFooterHtml = null;
1590:
1591: /**
1592: * <p>Extra HTML code to be appended to the <code><td></code> HTML element that
1593: * is rendered for the table column footer. Use only code that is valid in an HTML
1594: * <code><td></code> element. The code you specify is inserted in the HTML
1595: * element, and is not checked for validity. For example, you might set this
1596: * attribute to <code>"nowrap=`nowrap'"</code>.</p>
1597: */
1598: public String getExtraTableFooterHtml() {
1599: if (this .extraTableFooterHtml != null) {
1600: return this .extraTableFooterHtml;
1601: }
1602: ValueBinding _vb = getValueBinding("extraTableFooterHtml");
1603: if (_vb != null) {
1604: return (String) _vb.getValue(getFacesContext());
1605: }
1606: return null;
1607: }
1608:
1609: /**
1610: * <p>Extra HTML code to be appended to the <code><td></code> HTML element that
1611: * is rendered for the table column footer. Use only code that is valid in an HTML
1612: * <code><td></code> element. The code you specify is inserted in the HTML
1613: * element, and is not checked for validity. For example, you might set this
1614: * attribute to <code>"nowrap=`nowrap'"</code>.</p>
1615: * @see #getExtraTableFooterHtml()
1616: */
1617: public void setExtraTableFooterHtml(String extraTableFooterHtml) {
1618: this .extraTableFooterHtml = extraTableFooterHtml;
1619: }
1620:
1621: // footerText
1622: private String footerText = null;
1623:
1624: /**
1625: * <p>The text to be displayed in the column footer.</p>
1626: */
1627: public String getFooterText() {
1628: if (this .footerText != null) {
1629: return this .footerText;
1630: }
1631: ValueBinding _vb = getValueBinding("footerText");
1632: if (_vb != null) {
1633: return (String) _vb.getValue(getFacesContext());
1634: }
1635: return null;
1636: }
1637:
1638: /**
1639: * <p>The text to be displayed in the column footer.</p>
1640: * @see #getFooterText()
1641: */
1642: public void setFooterText(String footerText) {
1643: this .footerText = footerText;
1644: }
1645:
1646: // headerText
1647: private String headerText = null;
1648:
1649: /**
1650: * <p>The text to be displayed in the column header.</p>
1651: */
1652: public String getHeaderText() {
1653: if (this .headerText != null) {
1654: return this .headerText;
1655: }
1656: ValueBinding _vb = getValueBinding("headerText");
1657: if (_vb != null) {
1658: return (String) _vb.getValue(getFacesContext());
1659: }
1660: return null;
1661: }
1662:
1663: /**
1664: * <p>The text to be displayed in the column header.</p>
1665: * @see #getHeaderText()
1666: */
1667: public void setHeaderText(String headerText) {
1668: this .headerText = headerText;
1669: }
1670:
1671: // headers
1672: private String headers = null;
1673:
1674: /**
1675: * <p>Space separated list of header cell ID values</p>
1676: */
1677: public String getHeaders() {
1678: if (this .headers != null) {
1679: return this .headers;
1680: }
1681: ValueBinding _vb = getValueBinding("headers");
1682: if (_vb != null) {
1683: return (String) _vb.getValue(getFacesContext());
1684: }
1685: return null;
1686: }
1687:
1688: /**
1689: * <p>Space separated list of header cell ID values</p>
1690: * @see #getHeaders()
1691: */
1692: public void setHeaders(String headers) {
1693: this .headers = headers;
1694: }
1695:
1696: // height
1697: private String height = null;
1698:
1699: /**
1700: * <p>Set the cell height in pixels (deprecated in HTML 4.0)</p>
1701: */
1702: public String getHeight() {
1703: if (this .height != null) {
1704: return this .height;
1705: }
1706: ValueBinding _vb = getValueBinding("height");
1707: if (_vb != null) {
1708: return (String) _vb.getValue(getFacesContext());
1709: }
1710: return null;
1711: }
1712:
1713: /**
1714: * <p>Set the cell height in pixels (deprecated in HTML 4.0)</p>
1715: * @see #getHeight()
1716: */
1717: public void setHeight(String height) {
1718: this .height = height;
1719: }
1720:
1721: // noWrap
1722: private boolean noWrap = false;
1723: private boolean noWrap_set = false;
1724:
1725: /**
1726: * <p>Disable word wrapping (deprecated in HTML 4.0)</p>
1727: */
1728: public boolean isNoWrap() {
1729: if (this .noWrap_set) {
1730: return this .noWrap;
1731: }
1732: ValueBinding _vb = getValueBinding("noWrap");
1733: if (_vb != null) {
1734: Object _result = _vb.getValue(getFacesContext());
1735: if (_result == null) {
1736: return false;
1737: } else {
1738: return ((Boolean) _result).booleanValue();
1739: }
1740: }
1741: return false;
1742: }
1743:
1744: /**
1745: * <p>Disable word wrapping (deprecated in HTML 4.0)</p>
1746: * @see #isNoWrap()
1747: */
1748: public void setNoWrap(boolean noWrap) {
1749: this .noWrap = noWrap;
1750: this .noWrap_set = true;
1751: }
1752:
1753: // onClick
1754: private String onClick = null;
1755:
1756: /**
1757: * <p>Scripting code executed when a mouse click
1758: * occurs over this component.</p>
1759: */
1760: public String getOnClick() {
1761: if (this .onClick != null) {
1762: return this .onClick;
1763: }
1764: ValueBinding _vb = getValueBinding("onClick");
1765: if (_vb != null) {
1766: return (String) _vb.getValue(getFacesContext());
1767: }
1768: return null;
1769: }
1770:
1771: /**
1772: * <p>Scripting code executed when a mouse click
1773: * occurs over this component.</p>
1774: * @see #getOnClick()
1775: */
1776: public void setOnClick(String onClick) {
1777: this .onClick = onClick;
1778: }
1779:
1780: // onDblClick
1781: private String onDblClick = null;
1782:
1783: /**
1784: * <p>Scripting code executed when a mouse double click
1785: * occurs over this component.</p>
1786: */
1787: public String getOnDblClick() {
1788: if (this .onDblClick != null) {
1789: return this .onDblClick;
1790: }
1791: ValueBinding _vb = getValueBinding("onDblClick");
1792: if (_vb != null) {
1793: return (String) _vb.getValue(getFacesContext());
1794: }
1795: return null;
1796: }
1797:
1798: /**
1799: * <p>Scripting code executed when a mouse double click
1800: * occurs over this component.</p>
1801: * @see #getOnDblClick()
1802: */
1803: public void setOnDblClick(String onDblClick) {
1804: this .onDblClick = onDblClick;
1805: }
1806:
1807: // onKeyDown
1808: private String onKeyDown = null;
1809:
1810: /**
1811: * <p>Scripting code executed when the user presses down on a key while the
1812: * component has focus.</p>
1813: */
1814: public String getOnKeyDown() {
1815: if (this .onKeyDown != null) {
1816: return this .onKeyDown;
1817: }
1818: ValueBinding _vb = getValueBinding("onKeyDown");
1819: if (_vb != null) {
1820: return (String) _vb.getValue(getFacesContext());
1821: }
1822: return null;
1823: }
1824:
1825: /**
1826: * <p>Scripting code executed when the user presses down on a key while the
1827: * component has focus.</p>
1828: * @see #getOnKeyDown()
1829: */
1830: public void setOnKeyDown(String onKeyDown) {
1831: this .onKeyDown = onKeyDown;
1832: }
1833:
1834: // onKeyPress
1835: private String onKeyPress = null;
1836:
1837: /**
1838: * <p>Scripting code executed when the user presses and releases a key while
1839: * the component has focus.</p>
1840: */
1841: public String getOnKeyPress() {
1842: if (this .onKeyPress != null) {
1843: return this .onKeyPress;
1844: }
1845: ValueBinding _vb = getValueBinding("onKeyPress");
1846: if (_vb != null) {
1847: return (String) _vb.getValue(getFacesContext());
1848: }
1849: return null;
1850: }
1851:
1852: /**
1853: * <p>Scripting code executed when the user presses and releases a key while
1854: * the component has focus.</p>
1855: * @see #getOnKeyPress()
1856: */
1857: public void setOnKeyPress(String onKeyPress) {
1858: this .onKeyPress = onKeyPress;
1859: }
1860:
1861: // onKeyUp
1862: private String onKeyUp = null;
1863:
1864: /**
1865: * <p>Scripting code executed when the user releases a key while the
1866: * component has focus.</p>
1867: */
1868: public String getOnKeyUp() {
1869: if (this .onKeyUp != null) {
1870: return this .onKeyUp;
1871: }
1872: ValueBinding _vb = getValueBinding("onKeyUp");
1873: if (_vb != null) {
1874: return (String) _vb.getValue(getFacesContext());
1875: }
1876: return null;
1877: }
1878:
1879: /**
1880: * <p>Scripting code executed when the user releases a key while the
1881: * component has focus.</p>
1882: * @see #getOnKeyUp()
1883: */
1884: public void setOnKeyUp(String onKeyUp) {
1885: this .onKeyUp = onKeyUp;
1886: }
1887:
1888: // onMouseDown
1889: private String onMouseDown = null;
1890:
1891: /**
1892: * <p>Scripting code executed when the user presses a mouse button while the
1893: * mouse pointer is on the component.</p>
1894: */
1895: public String getOnMouseDown() {
1896: if (this .onMouseDown != null) {
1897: return this .onMouseDown;
1898: }
1899: ValueBinding _vb = getValueBinding("onMouseDown");
1900: if (_vb != null) {
1901: return (String) _vb.getValue(getFacesContext());
1902: }
1903: return null;
1904: }
1905:
1906: /**
1907: * <p>Scripting code executed when the user presses a mouse button while the
1908: * mouse pointer is on the component.</p>
1909: * @see #getOnMouseDown()
1910: */
1911: public void setOnMouseDown(String onMouseDown) {
1912: this .onMouseDown = onMouseDown;
1913: }
1914:
1915: // onMouseMove
1916: private String onMouseMove = null;
1917:
1918: /**
1919: * <p>Scripting code executed when the user moves the mouse pointer while
1920: * over the component.</p>
1921: */
1922: public String getOnMouseMove() {
1923: if (this .onMouseMove != null) {
1924: return this .onMouseMove;
1925: }
1926: ValueBinding _vb = getValueBinding("onMouseMove");
1927: if (_vb != null) {
1928: return (String) _vb.getValue(getFacesContext());
1929: }
1930: return null;
1931: }
1932:
1933: /**
1934: * <p>Scripting code executed when the user moves the mouse pointer while
1935: * over the component.</p>
1936: * @see #getOnMouseMove()
1937: */
1938: public void setOnMouseMove(String onMouseMove) {
1939: this .onMouseMove = onMouseMove;
1940: }
1941:
1942: // onMouseOut
1943: private String onMouseOut = null;
1944:
1945: /**
1946: * <p>Scripting code executed when a mouse out movement
1947: * occurs over this component.</p>
1948: */
1949: public String getOnMouseOut() {
1950: if (this .onMouseOut != null) {
1951: return this .onMouseOut;
1952: }
1953: ValueBinding _vb = getValueBinding("onMouseOut");
1954: if (_vb != null) {
1955: return (String) _vb.getValue(getFacesContext());
1956: }
1957: return null;
1958: }
1959:
1960: /**
1961: * <p>Scripting code executed when a mouse out movement
1962: * occurs over this component.</p>
1963: * @see #getOnMouseOut()
1964: */
1965: public void setOnMouseOut(String onMouseOut) {
1966: this .onMouseOut = onMouseOut;
1967: }
1968:
1969: // onMouseOver
1970: private String onMouseOver = null;
1971:
1972: /**
1973: * <p>Scripting code executed when the user moves the mouse pointer into
1974: * the boundary of this component.</p>
1975: */
1976: public String getOnMouseOver() {
1977: if (this .onMouseOver != null) {
1978: return this .onMouseOver;
1979: }
1980: ValueBinding _vb = getValueBinding("onMouseOver");
1981: if (_vb != null) {
1982: return (String) _vb.getValue(getFacesContext());
1983: }
1984: return null;
1985: }
1986:
1987: /**
1988: * <p>Scripting code executed when the user moves the mouse pointer into
1989: * the boundary of this component.</p>
1990: * @see #getOnMouseOver()
1991: */
1992: public void setOnMouseOver(String onMouseOver) {
1993: this .onMouseOver = onMouseOver;
1994: }
1995:
1996: // onMouseUp
1997: private String onMouseUp = null;
1998:
1999: /**
2000: * <p>Scripting code executed when the user releases a mouse button while
2001: * the mouse pointer is on the component.</p>
2002: */
2003: public String getOnMouseUp() {
2004: if (this .onMouseUp != null) {
2005: return this .onMouseUp;
2006: }
2007: ValueBinding _vb = getValueBinding("onMouseUp");
2008: if (_vb != null) {
2009: return (String) _vb.getValue(getFacesContext());
2010: }
2011: return null;
2012: }
2013:
2014: /**
2015: * <p>Scripting code executed when the user releases a mouse button while
2016: * the mouse pointer is on the component.</p>
2017: * @see #getOnMouseUp()
2018: */
2019: public void setOnMouseUp(String onMouseUp) {
2020: this .onMouseUp = onMouseUp;
2021: }
2022:
2023: // rowHeader
2024: private boolean rowHeader = false;
2025: private boolean rowHeader_set = false;
2026:
2027: /**
2028: * <p>Use the <code>rowHeader</code> attribute to specify that the cells of the
2029: * column are acting as row headers. Row headers are cells that "label" the row.
2030: * For example, consider a table where the first column contains checkboxes, and
2031: * the second column contains user names. The third and subsequent columns contain
2032: * attributes of those users. The content of the cells in the user name column are
2033: * acting as row headers. The <code>ui:tableColumn</code> tag for the user name
2034: * column should set the <code>rowHeader</code> attribute to true. If a table
2035: * contains, for example, a system log with time stamp and log entry columns,
2036: * neither column is acting as a row header, so the <code>rowHeader</code>
2037: * attribute should not be set.
2038: * <br><br>
2039: * By default, most column cells are rendered by the table component with HTML
2040: * <code><td scope="col"></code> elements. The exceptions are columns that
2041: * contain checkboxes or radio buttons and spacer columns, all of which are
2042: * rendered as <code><td></code> elements without a scope property.
2043: * <br><br>
2044: * When you set the <code>rowHeader</code> attribute, the column cells are
2045: * rendered as <code><th scope="row"></code> elements, which enables
2046: * adaptive technologies such as screen readers to properly read the table to
2047: * indicate that the contents of these cells are headers for the rows.</p>
2048: */
2049: public boolean isRowHeader() {
2050: if (this .rowHeader_set) {
2051: return this .rowHeader;
2052: }
2053: ValueBinding _vb = getValueBinding("rowHeader");
2054: if (_vb != null) {
2055: Object _result = _vb.getValue(getFacesContext());
2056: if (_result == null) {
2057: return false;
2058: } else {
2059: return ((Boolean) _result).booleanValue();
2060: }
2061: }
2062: return false;
2063: }
2064:
2065: /**
2066: * <p>Use the <code>rowHeader</code> attribute to specify that the cells of the
2067: * column are acting as row headers. Row headers are cells that "label" the row.
2068: * For example, consider a table where the first column contains checkboxes, and
2069: * the second column contains user names. The third and subsequent columns contain
2070: * attributes of those users. The content of the cells in the user name column are
2071: * acting as row headers. The <code>ui:tableColumn</code> tag for the user name
2072: * column should set the <code>rowHeader</code> attribute to true. If a table
2073: * contains, for example, a system log with time stamp and log entry columns,
2074: * neither column is acting as a row header, so the <code>rowHeader</code>
2075: * attribute should not be set.
2076: * <br><br>
2077: * By default, most column cells are rendered by the table component with HTML
2078: * <code><td scope="col"></code> elements. The exceptions are columns that
2079: * contain checkboxes or radio buttons and spacer columns, all of which are
2080: * rendered as <code><td></code> elements without a scope property.
2081: * <br><br>
2082: * When you set the <code>rowHeader</code> attribute, the column cells are
2083: * rendered as <code><th scope="row"></code> elements, which enables
2084: * adaptive technologies such as screen readers to properly read the table to
2085: * indicate that the contents of these cells are headers for the rows.</p>
2086: * @see #isRowHeader()
2087: */
2088: public void setRowHeader(boolean rowHeader) {
2089: this .rowHeader = rowHeader;
2090: this .rowHeader_set = true;
2091: }
2092:
2093: // rowSpan
2094: private int rowSpan = Integer.MIN_VALUE;
2095: private boolean rowSpan_set = false;
2096:
2097: /**
2098: * <p>The number of rows spanned by a cell</p>
2099: */
2100: public int getRowSpan() {
2101: if (this .rowSpan_set) {
2102: return this .rowSpan;
2103: }
2104: ValueBinding _vb = getValueBinding("rowSpan");
2105: if (_vb != null) {
2106: Object _result = _vb.getValue(getFacesContext());
2107: if (_result == null) {
2108: return Integer.MIN_VALUE;
2109: } else {
2110: return ((Integer) _result).intValue();
2111: }
2112: }
2113: return Integer.MIN_VALUE;
2114: }
2115:
2116: /**
2117: * <p>The number of rows spanned by a cell</p>
2118: * @see #getRowSpan()
2119: */
2120: public void setRowSpan(int rowSpan) {
2121: this .rowSpan = rowSpan;
2122: this .rowSpan_set = true;
2123: }
2124:
2125: // scope
2126: private String scope = null;
2127:
2128: /**
2129: * <p>Indicates that information in a cell is also acting as a header</p>
2130: */
2131: public String getScope() {
2132: if (this .scope != null) {
2133: return this .scope;
2134: }
2135: ValueBinding _vb = getValueBinding("scope");
2136: if (_vb != null) {
2137: return (String) _vb.getValue(getFacesContext());
2138: }
2139: return null;
2140: }
2141:
2142: /**
2143: * <p>Indicates that information in a cell is also acting as a header</p>
2144: * @see #getScope()
2145: */
2146: public void setScope(String scope) {
2147: this .scope = scope;
2148: }
2149:
2150: // selectId
2151: private String selectId = null;
2152:
2153: /**
2154: * <p>Use the <code>selectId</code> attribute in select columns, which contain
2155: * checkboxes or radio buttons for selecting table rows. The value of
2156: * <code>selectId</code> must match the <code>id</code> attribute of the checkbox
2157: * or radioButton component that is a child of the tableColumn component. A fully
2158: * qualified ID based on the tableColumn component ID and the
2159: * <code>selectId</code> for the current row will be dynamically created for the
2160: * <code><input></code> element that is rendered for the checkbox or radio
2161: * button. The <code>selectId</code> is required for functionality that supports
2162: * the toggle buttons for selecting rows. The <code>selectId</code> also
2163: * identifies the column as a select column, for which the table component
2164: * uses different CSS styles.</p>
2165: */
2166: public String getSelectId() {
2167: if (this .selectId != null) {
2168: return this .selectId;
2169: }
2170: ValueBinding _vb = getValueBinding("selectId");
2171: if (_vb != null) {
2172: return (String) _vb.getValue(getFacesContext());
2173: }
2174: return null;
2175: }
2176:
2177: /**
2178: * <p>Use the <code>selectId</code> attribute in select columns, which contain
2179: * checkboxes or radio buttons for selecting table rows. The value of
2180: * <code>selectId</code> must match the <code>id</code> attribute of the checkbox
2181: * or radioButton component that is a child of the tableColumn component. A fully
2182: * qualified ID based on the tableColumn component ID and the
2183: * <code>selectId</code> for the current row will be dynamically created for the
2184: * <code><input></code> element that is rendered for the checkbox or radio
2185: * button. The <code>selectId</code> is required for functionality that supports
2186: * the toggle buttons for selecting rows. The <code>selectId</code> also
2187: * identifies the column as a select column, for which the table component
2188: * uses different CSS styles.</p>
2189: * @see #getSelectId()
2190: */
2191: public void setSelectId(String selectId) {
2192: this .selectId = selectId;
2193: }
2194:
2195: // severity
2196: private String severity = null;
2197:
2198: /**
2199: * <p>Use the <code>severity</code> attribute when including the <code>ui:alarm</code>
2200: * component in a column, to match the severity of the alarm. Valid values are
2201: * described in the <code>ui:alarm</code> documentation. When the
2202: * <code>severity</code> attribute is set in the tableColumn, the table
2203: * component renders sort tool tips to indicate that the column will be sorted
2204: * least/most severe first, and the table cell appears hightlighted according to
2205: * the level of severity. This functionality is overridden by the
2206: * <code>emptyCell</code> attribute.</p>
2207: */
2208: public String getSeverity() {
2209: if (this .severity != null) {
2210: return this .severity;
2211: }
2212: ValueBinding _vb = getValueBinding("severity");
2213: if (_vb != null) {
2214: return (String) _vb.getValue(getFacesContext());
2215: }
2216: return null;
2217: }
2218:
2219: /**
2220: * <p>Use the <code>severity</code> attribute when including the <code>ui:alarm</code>
2221: * component in a column, to match the severity of the alarm. Valid values are
2222: * described in the <code>ui:alarm</code> documentation. When the
2223: * <code>severity</code> attribute is set in the tableColumn, the table
2224: * component renders sort tool tips to indicate that the column will be sorted
2225: * least/most severe first, and the table cell appears hightlighted according to
2226: * the level of severity. This functionality is overridden by the
2227: * <code>emptyCell</code> attribute.</p>
2228: * @see #getSeverity()
2229: */
2230: public void setSeverity(String severity) {
2231: this .severity = severity;
2232: }
2233:
2234: // sort
2235: private Object sort = null;
2236:
2237: /**
2238: * <p>Use the <code>sort</code> attribute to specify a FieldKey id or SortCriteria
2239: * that defines the criteria to use for sorting the contents of a
2240: * TableDataProvider. If SortCriteria is provided, the object is used for sorting
2241: * as is. If an id is provided, a FieldIdSortCriteria is created for sorting. In
2242: * addition, a value binding can also be used to sort on an object that is
2243: * external to TableDataProvider, such as the selected state of a checkbox or
2244: * radiobutton. When a value binding is used, a ValueBindingSortCriteria object
2245: * is created for sorting. All sorting is based on the object type associated with
2246: * the data element (for example, Boolean, Character, Comparator, Date, Number,
2247: * and String). If the object type cannot be determined, the object is compared as
2248: * a String. The <code>sort</code> attribute is required for a column to be shown
2249: * as sortable.</p>
2250: */
2251: public Object getSort() {
2252: if (this .sort != null) {
2253: return this .sort;
2254: }
2255: ValueBinding _vb = getValueBinding("sort");
2256: if (_vb != null) {
2257: return (Object) _vb.getValue(getFacesContext());
2258: }
2259: return null;
2260: }
2261:
2262: /**
2263: * <p>Use the <code>sort</code> attribute to specify a FieldKey id or SortCriteria
2264: * that defines the criteria to use for sorting the contents of a
2265: * TableDataProvider. If SortCriteria is provided, the object is used for sorting
2266: * as is. If an id is provided, a FieldIdSortCriteria is created for sorting. In
2267: * addition, a value binding can also be used to sort on an object that is
2268: * external to TableDataProvider, such as the selected state of a checkbox or
2269: * radiobutton. When a value binding is used, a ValueBindingSortCriteria object
2270: * is created for sorting. All sorting is based on the object type associated with
2271: * the data element (for example, Boolean, Character, Comparator, Date, Number,
2272: * and String). If the object type cannot be determined, the object is compared as
2273: * a String. The <code>sort</code> attribute is required for a column to be shown
2274: * as sortable.</p>
2275: * @see #getSort()
2276: */
2277: public void setSort(Object sort) {
2278: this .sort = sort;
2279: }
2280:
2281: // sortIcon
2282: private String sortIcon = null;
2283:
2284: /**
2285: * <p>The theme identifier to use for the sort button that is displayed in the column
2286: * header. Use this attribute to override the default image.</p>
2287: */
2288: public String getSortIcon() {
2289: if (this .sortIcon != null) {
2290: return this .sortIcon;
2291: }
2292: ValueBinding _vb = getValueBinding("sortIcon");
2293: if (_vb != null) {
2294: return (String) _vb.getValue(getFacesContext());
2295: }
2296: return null;
2297: }
2298:
2299: /**
2300: * <p>The theme identifier to use for the sort button that is displayed in the column
2301: * header. Use this attribute to override the default image.</p>
2302: * @see #getSortIcon()
2303: */
2304: public void setSortIcon(String sortIcon) {
2305: this .sortIcon = sortIcon;
2306: }
2307:
2308: // sortImageURL
2309: private String sortImageURL = null;
2310:
2311: /**
2312: * <p>Absolute or relative URL to the image used for the sort button that is
2313: * displayed in the column header.</p>
2314: */
2315: public String getSortImageURL() {
2316: if (this .sortImageURL != null) {
2317: return this .sortImageURL;
2318: }
2319: ValueBinding _vb = getValueBinding("sortImageURL");
2320: if (_vb != null) {
2321: return (String) _vb.getValue(getFacesContext());
2322: }
2323: return null;
2324: }
2325:
2326: /**
2327: * <p>Absolute or relative URL to the image used for the sort button that is
2328: * displayed in the column header.</p>
2329: * @see #getSortImageURL()
2330: */
2331: public void setSortImageURL(String sortImageURL) {
2332: this .sortImageURL = sortImageURL;
2333: }
2334:
2335: // spacerColumn
2336: private boolean spacerColumn = false;
2337: private boolean spacerColumn_set = false;
2338:
2339: /**
2340: * <p>Use the <code>spacerColumn</code> attribute to use the column as a blank column
2341: * to enhance spacing in two or three column tables. When the
2342: * <code>spacerColumn</code> attribute is true, the CSS styles applied to the
2343: * column make it appear as if the columns are justified. If a column header and
2344: * footer are required, provide an empty string for the <code>headerText</code>
2345: * and <code>footerText</code> attributes. Set the <code>width</code> attribute to
2346: * justify columns accordingly.</p>
2347: */
2348: public boolean isSpacerColumn() {
2349: if (this .spacerColumn_set) {
2350: return this .spacerColumn;
2351: }
2352: ValueBinding _vb = getValueBinding("spacerColumn");
2353: if (_vb != null) {
2354: Object _result = _vb.getValue(getFacesContext());
2355: if (_result == null) {
2356: return false;
2357: } else {
2358: return ((Boolean) _result).booleanValue();
2359: }
2360: }
2361: return false;
2362: }
2363:
2364: /**
2365: * <p>Use the <code>spacerColumn</code> attribute to use the column as a blank column
2366: * to enhance spacing in two or three column tables. When the
2367: * <code>spacerColumn</code> attribute is true, the CSS styles applied to the
2368: * column make it appear as if the columns are justified. If a column header and
2369: * footer are required, provide an empty string for the <code>headerText</code>
2370: * and <code>footerText</code> attributes. Set the <code>width</code> attribute to
2371: * justify columns accordingly.</p>
2372: * @see #isSpacerColumn()
2373: */
2374: public void setSpacerColumn(boolean spacerColumn) {
2375: this .spacerColumn = spacerColumn;
2376: this .spacerColumn_set = true;
2377: }
2378:
2379: // style
2380: private String style = null;
2381:
2382: /**
2383: * <p>CSS style(s) to be applied when this component is rendered.</p>
2384: */
2385: public String getStyle() {
2386: if (this .style != null) {
2387: return this .style;
2388: }
2389: ValueBinding _vb = getValueBinding("style");
2390: if (_vb != null) {
2391: return (String) _vb.getValue(getFacesContext());
2392: }
2393: return null;
2394: }
2395:
2396: /**
2397: * <p>CSS style(s) to be applied when this component is rendered.</p>
2398: * @see #getStyle()
2399: */
2400: public void setStyle(String style) {
2401: this .style = style;
2402: }
2403:
2404: // styleClass
2405: private String styleClass = null;
2406:
2407: /**
2408: * <p>CSS style class(es) to be applied when this component is rendered.</p>
2409: */
2410: public String getStyleClass() {
2411: if (this .styleClass != null) {
2412: return this .styleClass;
2413: }
2414: ValueBinding _vb = getValueBinding("styleClass");
2415: if (_vb != null) {
2416: return (String) _vb.getValue(getFacesContext());
2417: }
2418: return null;
2419: }
2420:
2421: /**
2422: * <p>CSS style class(es) to be applied when this component is rendered.</p>
2423: * @see #getStyleClass()
2424: */
2425: public void setStyleClass(String styleClass) {
2426: this .styleClass = styleClass;
2427: }
2428:
2429: // tableFooterText
2430: private String tableFooterText = null;
2431:
2432: /**
2433: * <p>The text to be displayed in the table column footer. The table column footer is
2434: * displayed once per table, and is especially useful in tables with multiple
2435: * groups of rows.</p>
2436: */
2437: public String getTableFooterText() {
2438: if (this .tableFooterText != null) {
2439: return this .tableFooterText;
2440: }
2441: ValueBinding _vb = getValueBinding("tableFooterText");
2442: if (_vb != null) {
2443: return (String) _vb.getValue(getFacesContext());
2444: }
2445: return null;
2446: }
2447:
2448: /**
2449: * <p>The text to be displayed in the table column footer. The table column footer is
2450: * displayed once per table, and is especially useful in tables with multiple
2451: * groups of rows.</p>
2452: * @see #getTableFooterText()
2453: */
2454: public void setTableFooterText(String tableFooterText) {
2455: this .tableFooterText = tableFooterText;
2456: }
2457:
2458: // toolTip
2459: private String toolTip = null;
2460:
2461: /**
2462: * <p>Display the text as a tooltip for this component</p>
2463: */
2464: public String getToolTip() {
2465: if (this .toolTip != null) {
2466: return this .toolTip;
2467: }
2468: ValueBinding _vb = getValueBinding("toolTip");
2469: if (_vb != null) {
2470: return (String) _vb.getValue(getFacesContext());
2471: }
2472: return null;
2473: }
2474:
2475: /**
2476: * <p>Display the text as a tooltip for this component</p>
2477: * @see #getToolTip()
2478: */
2479: public void setToolTip(String toolTip) {
2480: this .toolTip = toolTip;
2481: }
2482:
2483: // valign
2484: private String valign = null;
2485:
2486: /**
2487: * <p>Vertical alignment (top, middle, bottom) for the content of each cell in the column</p>
2488: */
2489: public String getValign() {
2490: if (this .valign != null) {
2491: return this .valign;
2492: }
2493: ValueBinding _vb = getValueBinding("valign");
2494: if (_vb != null) {
2495: return (String) _vb.getValue(getFacesContext());
2496: }
2497: return null;
2498: }
2499:
2500: /**
2501: * <p>Vertical alignment (top, middle, bottom) for the content of each cell in the column</p>
2502: * @see #getValign()
2503: */
2504: public void setValign(String valign) {
2505: this .valign = valign;
2506: }
2507:
2508: // visible
2509: private boolean visible = false;
2510: private boolean visible_set = false;
2511:
2512: /**
2513: * <p>Use the visible attribute to indicate whether the component should be
2514: * viewable by the user in the rendered HTML page. If set to false, the
2515: * HTML code for the component is present in the page, but the component
2516: * is hidden with style attributes. By default, visible is set to true, so
2517: * HTML for the component HTML is included and visible to the user. If the
2518: * component is not visible, it can still be processed on subsequent form
2519: * submissions because the HTML is present.</p>
2520: */
2521: public boolean isVisible() {
2522: if (this .visible_set) {
2523: return this .visible;
2524: }
2525: ValueBinding _vb = getValueBinding("visible");
2526: if (_vb != null) {
2527: Object _result = _vb.getValue(getFacesContext());
2528: if (_result == null) {
2529: return false;
2530: } else {
2531: return ((Boolean) _result).booleanValue();
2532: }
2533: }
2534: return true;
2535: }
2536:
2537: /**
2538: * <p>Use the visible attribute to indicate whether the component should be
2539: * viewable by the user in the rendered HTML page. If set to false, the
2540: * HTML code for the component is present in the page, but the component
2541: * is hidden with style attributes. By default, visible is set to true, so
2542: * HTML for the component HTML is included and visible to the user. If the
2543: * component is not visible, it can still be processed on subsequent form
2544: * submissions because the HTML is present.</p>
2545: * @see #isVisible()
2546: */
2547: public void setVisible(boolean visible) {
2548: this .visible = visible;
2549: this .visible_set = true;
2550: }
2551:
2552: // width
2553: private String width = null;
2554:
2555: /**
2556: * <p>Set the width of the column in either pixels or percent(deprecated in HTML 4.0)</p>
2557: */
2558: public String getWidth() {
2559: if (this .width != null) {
2560: return this .width;
2561: }
2562: ValueBinding _vb = getValueBinding("width");
2563: if (_vb != null) {
2564: return (String) _vb.getValue(getFacesContext());
2565: }
2566: return null;
2567: }
2568:
2569: /**
2570: * <p>Set the width of the column in either pixels or percent(deprecated in HTML 4.0)</p>
2571: * @see #getWidth()
2572: */
2573: public void setWidth(String width) {
2574: this .width = width;
2575: }
2576:
2577: /**
2578: * <p>Restore the state of this component.</p>
2579: */
2580: public void restoreState(FacesContext _context, Object _state) {
2581: Object _values[] = (Object[]) _state;
2582: super .restoreState(_context, _values[0]);
2583: this .abbr = (String) _values[1];
2584: this .align = (String) _values[2];
2585: this .alignKey = (Object) _values[3];
2586: this .axis = (String) _values[4];
2587: this .bgColor = (String) _values[5];
2588: this ._char = (String) _values[6];
2589: this .charOff = (String) _values[7];
2590: this .colSpan = ((Integer) _values[8]).intValue();
2591: this .colSpan_set = ((Boolean) _values[9]).booleanValue();
2592: this .descending = ((Boolean) _values[10]).booleanValue();
2593: this .descending_set = ((Boolean) _values[11]).booleanValue();
2594: this .embeddedActions = ((Boolean) _values[12]).booleanValue();
2595: this .embeddedActions_set = ((Boolean) _values[13])
2596: .booleanValue();
2597: this .emptyCell = ((Boolean) _values[14]).booleanValue();
2598: this .emptyCell_set = ((Boolean) _values[15]).booleanValue();
2599: this .extraFooterHtml = (String) _values[16];
2600: this .extraHeaderHtml = (String) _values[17];
2601: this .extraTableFooterHtml = (String) _values[18];
2602: this .footerText = (String) _values[19];
2603: this .headerText = (String) _values[20];
2604: this .headers = (String) _values[21];
2605: this .height = (String) _values[22];
2606: this .noWrap = ((Boolean) _values[23]).booleanValue();
2607: this .noWrap_set = ((Boolean) _values[24]).booleanValue();
2608: this .onClick = (String) _values[25];
2609: this .onDblClick = (String) _values[26];
2610: this .onKeyDown = (String) _values[27];
2611: this .onKeyPress = (String) _values[28];
2612: this .onKeyUp = (String) _values[29];
2613: this .onMouseDown = (String) _values[30];
2614: this .onMouseMove = (String) _values[31];
2615: this .onMouseOut = (String) _values[32];
2616: this .onMouseOver = (String) _values[33];
2617: this .onMouseUp = (String) _values[34];
2618: this .rowHeader = ((Boolean) _values[35]).booleanValue();
2619: this .rowHeader_set = ((Boolean) _values[36]).booleanValue();
2620: this .rowSpan = ((Integer) _values[37]).intValue();
2621: this .rowSpan_set = ((Boolean) _values[38]).booleanValue();
2622: this .scope = (String) _values[39];
2623: this .selectId = (String) _values[40];
2624: this .severity = (String) _values[41];
2625: this .sort = (Object) _values[42];
2626: this .sortIcon = (String) _values[43];
2627: this .sortImageURL = (String) _values[44];
2628: this .spacerColumn = ((Boolean) _values[45]).booleanValue();
2629: this .spacerColumn_set = ((Boolean) _values[46]).booleanValue();
2630: this .style = (String) _values[47];
2631: this .styleClass = (String) _values[48];
2632: this .tableFooterText = (String) _values[49];
2633: this .toolTip = (String) _values[50];
2634: this .valign = (String) _values[51];
2635: this .visible = ((Boolean) _values[52]).booleanValue();
2636: this .visible_set = ((Boolean) _values[53]).booleanValue();
2637: this .width = (String) _values[54];
2638: }
2639:
2640: /**
2641: * <p>Save the state of this component.</p>
2642: */
2643: public Object saveState(FacesContext _context) {
2644: Object _values[] = new Object[55];
2645: _values[0] = super .saveState(_context);
2646: _values[1] = this .abbr;
2647: _values[2] = this .align;
2648: _values[3] = this .alignKey;
2649: _values[4] = this .axis;
2650: _values[5] = this .bgColor;
2651: _values[6] = this ._char;
2652: _values[7] = this .charOff;
2653: _values[8] = new Integer(this .colSpan);
2654: _values[9] = this .colSpan_set ? Boolean.TRUE : Boolean.FALSE;
2655: _values[10] = this .descending ? Boolean.TRUE : Boolean.FALSE;
2656: _values[11] = this .descending_set ? Boolean.TRUE
2657: : Boolean.FALSE;
2658: _values[12] = this .embeddedActions ? Boolean.TRUE
2659: : Boolean.FALSE;
2660: _values[13] = this .embeddedActions_set ? Boolean.TRUE
2661: : Boolean.FALSE;
2662: _values[14] = this .emptyCell ? Boolean.TRUE : Boolean.FALSE;
2663: _values[15] = this .emptyCell_set ? Boolean.TRUE : Boolean.FALSE;
2664: _values[16] = this .extraFooterHtml;
2665: _values[17] = this .extraHeaderHtml;
2666: _values[18] = this .extraTableFooterHtml;
2667: _values[19] = this .footerText;
2668: _values[20] = this .headerText;
2669: _values[21] = this .headers;
2670: _values[22] = this .height;
2671: _values[23] = this .noWrap ? Boolean.TRUE : Boolean.FALSE;
2672: _values[24] = this .noWrap_set ? Boolean.TRUE : Boolean.FALSE;
2673: _values[25] = this .onClick;
2674: _values[26] = this .onDblClick;
2675: _values[27] = this .onKeyDown;
2676: _values[28] = this .onKeyPress;
2677: _values[29] = this .onKeyUp;
2678: _values[30] = this .onMouseDown;
2679: _values[31] = this .onMouseMove;
2680: _values[32] = this .onMouseOut;
2681: _values[33] = this .onMouseOver;
2682: _values[34] = this .onMouseUp;
2683: _values[35] = this .rowHeader ? Boolean.TRUE : Boolean.FALSE;
2684: _values[36] = this .rowHeader_set ? Boolean.TRUE : Boolean.FALSE;
2685: _values[37] = new Integer(this .rowSpan);
2686: _values[38] = this .rowSpan_set ? Boolean.TRUE : Boolean.FALSE;
2687: _values[39] = this .scope;
2688: _values[40] = this .selectId;
2689: _values[41] = this .severity;
2690: _values[42] = this .sort;
2691: _values[43] = this .sortIcon;
2692: _values[44] = this .sortImageURL;
2693: _values[45] = this .spacerColumn ? Boolean.TRUE : Boolean.FALSE;
2694: _values[46] = this .spacerColumn_set ? Boolean.TRUE
2695: : Boolean.FALSE;
2696: _values[47] = this .style;
2697: _values[48] = this .styleClass;
2698: _values[49] = this .tableFooterText;
2699: _values[50] = this .toolTip;
2700: _values[51] = this .valign;
2701: _values[52] = this .visible ? Boolean.TRUE : Boolean.FALSE;
2702: _values[53] = this .visible_set ? Boolean.TRUE : Boolean.FALSE;
2703: _values[54] = this.width;
2704: return _values;
2705: }
2706:
2707: }
|