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

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

public class TableHeader
extends TableHeaderBase
implements javax.faces.component.NamingContainer

Component that represents various table headers, including sortable, selection, and group headers.

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.TableHeader.level = FINE
 


Field Summary
static java.lang.String ADD_SORT_BUTTON_FACET
          The facet name for the add sort button.
static java.lang.String ADD_SORT_BUTTON_ID
          The component id for the add sort button.
static java.lang.String COLLAPSED_HIDDEN_FIELD_FACET
          The facet name for the collapsed hidden field.
static java.lang.String COLLAPSED_HIDDEN_FIELD_ID
          The component id for the collapsed hidden field.
static java.lang.String GROUP_PANEL_TOGGLE_BUTTON_FACET
          The facet name for the table row group toggle button.
static java.lang.String GROUP_PANEL_TOGGLE_BUTTON_ID
          The component id for the table row group toggle button.
static java.lang.String PRIMARY_SORT_BUTTON_FACET
          The facet name for the primary sort button.
static java.lang.String PRIMARY_SORT_BUTTON_ID
          The component id for the primary sort button.
static java.lang.String PRIMARY_SORT_LINK_FACET
          The facet name for the primary sort link.
static java.lang.String PRIMARY_SORT_LINK_ID
          The component id for the primary sort link.
static java.lang.String SELECT_MULTIPLE_TOGGLE_BUTTON_FACET
          The facet name for the select multiple toggle button.
static java.lang.String SELECT_MULTIPLE_TOGGLE_BUTTON_ID
          The component id for the select multiple toggle button.
static java.lang.String SELECT_SORT_BUTTON_FACET
          The facet name for the selection column sort button.
static java.lang.String SELECT_SORT_BUTTON_ID
          The component id for the selection column sort button.
static java.lang.String SORT_LEVEL_TEXT_FACET
          The facet name for the sort level text.
static java.lang.String SORT_LEVEL_TEXT_ID
          The component id for the sort level text.
static java.lang.String TOGGLE_SORT_BUTTON_FACET
          The facet name for the toggle sort button.
static java.lang.String TOGGLE_SORT_BUTTON_ID
          The component id for the toggle sort button.
static java.lang.String WARNING_ICON_FACET
          The facet name for the warning icon.
static java.lang.String WARNING_ICON_ID
          The component id for the warning icon.
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
TableHeader()
          Default constructor
 
Method Summary
 void encodeBegin(javax.faces.context.FacesContext context)
          If the rendered property is true, render the begining of the current state of this UIComponent to the response contained in the specified FacesContext.
 javax.faces.component.UIComponent getAddSortButton()
          Get add sort button.
 javax.faces.component.UIComponent getCollapsedHiddenField()
          Get select multiple toggle button.
 javax.faces.component.UIComponent getGroupPanelToggleButton()
          Get group panel toggle button.
 javax.faces.component.UIComponent getPrimarySortButton()
          Get primary sort button.
 javax.faces.component.UIComponent getPrimarySortLink()
          Get primary sort link.
 javax.faces.component.UIComponent getSelectMultipleToggleButton()
          Get select multiple toggle button.
 javax.faces.component.UIComponent getSelectSortButton()
          Get select sort button.
 int getSortCount()
          Helper method to get the total number of sorts applied.
 int getSortLevel()
          Helper method to get sort level for this component.
 javax.faces.component.UIComponent getSortLevelText()
          Get sort level static text.
 Table getTableAncestor()
          Get the closest Table ancestor that encloses this component.
 TableColumn getTableColumnAncestor()
          Get the closest TableColumn ancestor that encloses this component.
 TableRowGroup getTableRowGroupAncestor()
          Get the closest TableRowGroup ancestor that encloses this component.
 javax.faces.component.UIComponent getToggleSortButton()
          Get toggle sort button.
 javax.faces.component.UIComponent getWarningIcon()
          Get warning icon.
 
Methods inherited from class com.sun.rave.web.ui.component.TableHeaderBase
getAbbr, getAlign, getAxis, getBgColor, getChar, getCharOff, getColSpan, getExtraHtml, getFamily, getHeaders, getHeight, getOnClick, getOnDblClick, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRowSpan, getScope, getStyle, getStyleClass, getToolTip, getValign, getWidth, isGroupHeader, isNoWrap, isSelectHeader, isSortHeader, isVisible, restoreState, saveState, setAbbr, setAlign, setAxis, setBgColor, setChar, setCharOff, setColSpan, setExtraHtml, setGroupHeader, setHeaders, setHeight, setNoWrap, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRowSpan, setScope, setSelectHeader, setSortHeader, setStyle, setStyleClass, setToolTip, setValign, setVisible, setWidth
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, 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

ADD_SORT_BUTTON_ID

public static final java.lang.String ADD_SORT_BUTTON_ID
The component id for the add sort button.

See Also:
Constant Field Values

ADD_SORT_BUTTON_FACET

public static final java.lang.String ADD_SORT_BUTTON_FACET
The facet name for the add sort button.

See Also:
Constant Field Values

COLLAPSED_HIDDEN_FIELD_ID

public static final java.lang.String COLLAPSED_HIDDEN_FIELD_ID
The component id for the collapsed hidden field.

See Also:
Constant Field Values

COLLAPSED_HIDDEN_FIELD_FACET

public static final java.lang.String COLLAPSED_HIDDEN_FIELD_FACET
The facet name for the collapsed hidden field.

See Also:
Constant Field Values

GROUP_PANEL_TOGGLE_BUTTON_ID

public static final java.lang.String GROUP_PANEL_TOGGLE_BUTTON_ID
The component id for the table row group toggle button.

See Also:
Constant Field Values

GROUP_PANEL_TOGGLE_BUTTON_FACET

public static final java.lang.String GROUP_PANEL_TOGGLE_BUTTON_FACET
The facet name for the table row group toggle button.

See Also:
Constant Field Values

PRIMARY_SORT_BUTTON_ID

public static final java.lang.String PRIMARY_SORT_BUTTON_ID
The component id for the primary sort button.

See Also:
Constant Field Values

PRIMARY_SORT_BUTTON_FACET

public static final java.lang.String PRIMARY_SORT_BUTTON_FACET
The facet name for the primary sort button.

See Also:
Constant Field Values

PRIMARY_SORT_LINK_ID

public static final java.lang.String PRIMARY_SORT_LINK_ID
The component id for the primary sort link.

See Also:
Constant Field Values

PRIMARY_SORT_LINK_FACET

public static final java.lang.String PRIMARY_SORT_LINK_FACET
The facet name for the primary sort link.

See Also:
Constant Field Values

SELECT_MULTIPLE_TOGGLE_BUTTON_ID

public static final java.lang.String SELECT_MULTIPLE_TOGGLE_BUTTON_ID
The component id for the select multiple toggle button.

See Also:
Constant Field Values

SELECT_MULTIPLE_TOGGLE_BUTTON_FACET

public static final java.lang.String SELECT_MULTIPLE_TOGGLE_BUTTON_FACET
The facet name for the select multiple toggle button.

See Also:
Constant Field Values

SELECT_SORT_BUTTON_ID

public static final java.lang.String SELECT_SORT_BUTTON_ID
The component id for the selection column sort button.

See Also:
Constant Field Values

SELECT_SORT_BUTTON_FACET

public static final java.lang.String SELECT_SORT_BUTTON_FACET
The facet name for the selection column sort button.

See Also:
Constant Field Values

SORT_LEVEL_TEXT_ID

public static final java.lang.String SORT_LEVEL_TEXT_ID
The component id for the sort level text.

See Also:
Constant Field Values

SORT_LEVEL_TEXT_FACET

public static final java.lang.String SORT_LEVEL_TEXT_FACET
The facet name for the sort level text.

See Also:
Constant Field Values

TOGGLE_SORT_BUTTON_ID

public static final java.lang.String TOGGLE_SORT_BUTTON_ID
The component id for the toggle sort button.

See Also:
Constant Field Values

TOGGLE_SORT_BUTTON_FACET

public static final java.lang.String TOGGLE_SORT_BUTTON_FACET
The facet name for the toggle sort button.

See Also:
Constant Field Values

WARNING_ICON_ID

public static final java.lang.String WARNING_ICON_ID
The component id for the warning icon.

See Also:
Constant Field Values

WARNING_ICON_FACET

public static final java.lang.String WARNING_ICON_FACET
The facet name for the warning icon.

See Also:
Constant Field Values
Constructor Detail

TableHeader

public TableHeader()
Default constructor

Method Detail

getSortCount

public int getSortCount()
Helper method to get the total number of sorts applied.

Returns:
The sort count.

getSortLevel

public int getSortLevel()
Helper method to get sort level for this component.

Returns:
The sort level or 0 if sort does not apply.

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.

getTableRowGroupAncestor

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

Returns:
The TableRowGroup ancestor.

getCollapsedHiddenField

public javax.faces.component.UIComponent getCollapsedHiddenField()
Get select multiple toggle button.

Returns:
The select multiple toggle button.

getGroupPanelToggleButton

public javax.faces.component.UIComponent getGroupPanelToggleButton()
Get group panel toggle button.

Returns:
The group panel toggle button.

getSelectMultipleToggleButton

public javax.faces.component.UIComponent getSelectMultipleToggleButton()
Get select multiple toggle button.

Returns:
The select multiple toggle button.

getWarningIcon

public javax.faces.component.UIComponent getWarningIcon()
Get warning icon.

Returns:
The warning icon.

getAddSortButton

public javax.faces.component.UIComponent getAddSortButton()
Get add sort button.

Returns:
The add sort button.

getPrimarySortButton

public javax.faces.component.UIComponent getPrimarySortButton()
Get primary sort button.

Returns:
The primary sort button.

getPrimarySortLink

public javax.faces.component.UIComponent getPrimarySortLink()
Get primary sort link.

Returns:
The primary sort link.

getSelectSortButton

public javax.faces.component.UIComponent getSelectSortButton()
Get select sort button.

Returns:
The title sort button.

getSortLevelText

public javax.faces.component.UIComponent getSortLevelText()
Get sort level static text.

Returns:
The sort level static text.

getToggleSortButton

public javax.faces.component.UIComponent getToggleSortButton()
Get toggle sort button.

Returns:
The toggle sort button.

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
If the rendered property is true, render the begining of the current state of this UIComponent to the response contained in the specified FacesContext. If a Renderer is associated with this UIComponent, the actual encoding will be delegated to Renderer.encodeBegin(FacesContext, UIComponent).

Parameters:
context - FacesContext for the current request.
Throws:
java.io.IOException - if an input/output error occurs while rendering.
java.lang.NullPointerException - if FacesContext is null.