com.sun.rave.web.ui.component
Class TableColumn

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended bycom.sun.rave.web.ui.component.TableColumnBase
              extended bycom.sun.rave.web.ui.component.TableColumn
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class TableColumn
extends TableColumnBase
implements javax.faces.component.NamingContainer

Component that represents a table column.

The tableColumn component provides a layout mechanism for displaying columns of data. UI guidelines describe specific behavior that can applied to the rows and columns of data such as sorting, filtering, pagination, selection, and custom user actions. In addition, UI guidelines also define sections of the table that can be used for titles, row group headers, and placement of pre-defined and user defined actions.

Note: Column headers and footers are rendered by TableRowGroupRenderer. Table column footers are rendered by TableRenderer.

Note: To see the messages logged by this class, set the following global defaults in your JDK's "jre/lib/logging.properties" file.

 java.util.logging.ConsoleHandler.level = FINE
 com.sun.rave.web.ui.component.TableColumn.level = FINE
 

See TLD docs for more information.


Field Summary
static java.lang.String COLUMN_FOOTER_FACET
          The facet name for the column footer.
static java.lang.String COLUMN_FOOTER_ID
          The component id for the column footer.
static java.lang.String COLUMN_HEADER_FACET
          The facet name for the column header.
static java.lang.String COLUMN_HEADER_ID
          The component id for the column header.
static java.lang.String EMBEDDED_ACTION_SEPARATOR_ICON_FACET
          The facet name for the embedded action separator icon.
static java.lang.String EMBEDDED_ACTION_SEPARATOR_ICON_ID
          The component id for the embedded action separator icon.
static java.lang.String EMPTY_CELL_ICON_FACET
          The facet name for the empty cell icon.
static java.lang.String EMPTY_CELL_ICON_ID
          The component id for the empty cell icon.
static java.lang.String FOOTER_FACET
          The facet name for the footer area.
static java.lang.String HEADER_FACET
          The facet name for the header area.
static java.lang.String TABLE_COLUMN_FOOTER_FACET
          The facet name for the table column footer.
static java.lang.String TABLE_COLUMN_FOOTER_ID
          The component id for the table column footer.
static java.lang.String TABLE_FOOTER_FACET
          The facet name for the table footer area.
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
TableColumn()
          Default constructor
 
Method Summary
 java.lang.String getAlign()
          Get the horizontal alignment for the cell.
 int getColumnCount()
          Get the number of columns found for this component that have a rendered property of true.
 javax.faces.component.UIComponent getColumnFooter()
          Get column footer.
 javax.faces.component.UIComponent getColumnHeader()
          Get column header.
 javax.faces.component.UIComponent getEmbeddedActionSeparatorIcon()
          Get separator icon for embedded actions.
 javax.faces.component.UIComponent getEmptyCellIcon()
          Get the icon used to display inapplicable or unexpectedly empty cells.
 com.sun.data.provider.SortCriteria getSortCriteria()
          Get SortCriteria used for sorting the contents of a TableDataProvider.
 java.lang.String getSortToolTipAugment(boolean descending)
          Get sort tool tip augment based on the value given to the align property of the tableColumn component.
 Table getTableAncestor()
          Get the closest Table ancestor that encloses this component.
 TableColumn getTableColumnAncestor()
          Get the closest TableColumn ancestor that encloses this component.
 java.util.Iterator getTableColumnChildren()
          Get an Iterator over the TableColumn children found for this component.
 javax.faces.component.UIComponent getTableColumnFooter()
          Get table column footer.
 TableRowGroup getTableRowGroupAncestor()
          Get the closest TableRowGroup ancestor that encloses this component.
 
Methods inherited from class com.sun.rave.web.ui.component.TableColumnBase
getAbbr, getAlignKey, getAxis, getBgColor, getChar, getCharOff, getColSpan, getExtraFooterHtml, getExtraHeaderHtml, getExtraTableFooterHtml, getFamily, getFooterText, getHeaders, getHeaderText, getHeight, getOnClick, getOnDblClick, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRowSpan, getScope, getSelectId, getSeverity, getSort, getSortIcon, getSortImageURL, getStyle, getStyleClass, getTableFooterText, getToolTip, getValign, getWidth, isDescending, isEmbeddedActions, isEmptyCell, isNoWrap, isRowHeader, isSpacerColumn, isVisible, restoreState, saveState, setAbbr, setAlign, setAlignKey, setAxis, setBgColor, setChar, setCharOff, setColSpan, setDescending, setEmbeddedActions, setEmptyCell, setExtraFooterHtml, setExtraHeaderHtml, setExtraTableFooterHtml, setFooterText, setHeaders, setHeaderText, setHeight, setNoWrap, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRowHeader, setRowSpan, setScope, setSelectId, setSeverity, setSort, setSortIcon, setSortImageURL, setSpacerColumn, setStyle, setStyleClass, setTableFooterText, setToolTip, setValign, setVisible, setWidth
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_FOOTER_ID

public static final java.lang.String COLUMN_FOOTER_ID
The component id for the column footer.

See Also:
Constant Field Values

COLUMN_FOOTER_FACET

public static final java.lang.String COLUMN_FOOTER_FACET
The facet name for the column footer.

See Also:
Constant Field Values

COLUMN_HEADER_ID

public static final java.lang.String COLUMN_HEADER_ID
The component id for the column header.

See Also:
Constant Field Values

COLUMN_HEADER_FACET

public static final java.lang.String COLUMN_HEADER_FACET
The facet name for the column header.

See Also:
Constant Field Values

HEADER_FACET

public static final java.lang.String HEADER_FACET
The facet name for the header area.

See Also:
Constant Field Values

EMBEDDED_ACTION_SEPARATOR_ICON_ID

public static final java.lang.String EMBEDDED_ACTION_SEPARATOR_ICON_ID
The component id for the embedded action separator icon.

See Also:
Constant Field Values

EMBEDDED_ACTION_SEPARATOR_ICON_FACET

public static final java.lang.String EMBEDDED_ACTION_SEPARATOR_ICON_FACET
The facet name for the embedded action separator icon.

See Also:
Constant Field Values

EMPTY_CELL_ICON_ID

public static final java.lang.String EMPTY_CELL_ICON_ID
The component id for the empty cell icon.

See Also:
Constant Field Values

EMPTY_CELL_ICON_FACET

public static final java.lang.String EMPTY_CELL_ICON_FACET
The facet name for the empty cell icon.

See Also:
Constant Field Values

FOOTER_FACET

public static final java.lang.String FOOTER_FACET
The facet name for the footer area.

See Also:
Constant Field Values

TABLE_COLUMN_FOOTER_ID

public static final java.lang.String TABLE_COLUMN_FOOTER_ID
The component id for the table column footer.

See Also:
Constant Field Values

TABLE_COLUMN_FOOTER_FACET

public static final java.lang.String TABLE_COLUMN_FOOTER_FACET
The facet name for the table column footer.

See Also:
Constant Field Values

TABLE_FOOTER_FACET

public static final java.lang.String TABLE_FOOTER_FACET
The facet name for the table footer area.

See Also:
Constant Field Values
Constructor Detail

TableColumn

public TableColumn()
Default constructor

Method Detail

getTableAncestor

public Table getTableAncestor()
Get the closest Table ancestor that encloses this component.

Returns:
The Table ancestor.

getTableColumnAncestor

public TableColumn getTableColumnAncestor()
Get the closest TableColumn ancestor that encloses this component.

Returns:
The TableColumn ancestor.

getTableColumnChildren

public java.util.Iterator getTableColumnChildren()
Get an Iterator over the TableColumn children found for this component.

Returns:
An Iterator over the TableColumn children.

getColumnCount

public int getColumnCount()
Get the number of columns found for this component that have a rendered property of true.

Returns:
The number of rendered columns.

getTableRowGroupAncestor

public TableRowGroup getTableRowGroupAncestor()
Get the closest TableRowGroup ancestor that encloses this component.

Returns:
The TableRowGroup ancestor.

getColumnFooter

public javax.faces.component.UIComponent getColumnFooter()
Get column footer.

Returns:
The column footer.

getColumnHeader

public javax.faces.component.UIComponent getColumnHeader()
Get column header.

Returns:
The column header.

getTableColumnFooter

public javax.faces.component.UIComponent getTableColumnFooter()
Get table column footer.

Returns:
The table column footer.

getAlign

public java.lang.String getAlign()
Get the horizontal alignment for the cell.

Note: If the align property is specified, it is returned as is. However, if the alignKey property is provided, alignment is based on the object type of the data element. For example, Date and Number objects are aligned using "right", Character and String objects are aligned using "left", and Boolean objects are aligned using "center". Note that select columns are aligned using "center" by default.

Overrides:
getAlign in class TableColumnBase
Returns:
The horizontal alignment for the cell. If the align property is null or the object type cannot be determined, "left" is returned by default.

getEmptyCellIcon

public javax.faces.component.UIComponent getEmptyCellIcon()
Get the icon used to display inapplicable or unexpectedly empty cells.

Note: UI guidelines suggest not to use this for a value that is truly null, such as an empty alarm cell or a comment field which is blank, neither of which should have the dash image. Further, it is recomended not to use the dash image for cells that contain user interface elements such as checkboxes or drop-down lists when these elements are not applicable. Instead, simply do not display the user interface element.

Returns:
The icon used to display empty cells.

getEmbeddedActionSeparatorIcon

public javax.faces.component.UIComponent getEmbeddedActionSeparatorIcon()
Get separator icon for embedded actions.

Returns:
The separator icon for embedded actions.

getSortCriteria

public com.sun.data.provider.SortCriteria getSortCriteria()
Get SortCriteria used for sorting the contents of a TableDataProvider.

Note: If the sortKey attribute resolves to a SortCriteria object, it is returned as is. However, if there is a value binding, and it's not null, a ValueBindingSortCriteria object is created. If there is no value binding, a FieldIdSortCriteria object is created.

Returns:
The SortCriteria used for sorting.

getSortToolTipAugment

public java.lang.String getSortToolTipAugment(boolean descending)
Get sort tool tip augment based on the value given to the align property of the tableColumn component.

Parameters:
descending - Flag indicating descending sort.
Returns:
The sort tool tip augment.