org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table
Class TableRenderingContext

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableRenderingContext
Direct Known Subclasses:
TreeTableRenderingContext

public class TableRenderingContext
extends java.lang.Object


Field Summary
static int DONT_KNOW
          Indicates that a row or column count is not known.
static int HIDDEN_COLUMN
          Constant indicating that this column is not rendered
static int NORMAL_COLUMN
          Constant indicating that this column is visible
static int USER_INVISIBLE_COLUMN
          Constant indicating that this column is a user-invisible column
 
Constructor Summary
TableRenderingContext(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component)
           
 
Method Summary
 void columnHeadersPresent()
          indicates that this table has column headers, so the tableRenderer must render the table's columnHeader region.
 int getActualColumnCount()
          Get the actual column count.
 BandingData getBanding()
           
 org.apache.myfaces.trinidad.component.CollectionComponent getCollectionComponent()
          Get the CollectionComponent
 int getColumnCount()
          Get the count of indexed children.
 ColumnData getColumnData()
           
 java.lang.Object getColumnWidth(int physicalIndex)
           
static TableRenderingContext getCurrentInstance()
           
 javax.faces.component.UIComponent getDetail()
          Get the detail node (hide/show)
 int getDetailColumnIndex()
          gets the physical index of the details column
 java.lang.Object getHeaderNodesList()
          Returns the opaque nodeList object used by column groups to store the header structure.
 int[] getHiddenColumns()
          Get a boolean array of columns, with true representing each hidden column.
 java.lang.String getJSVarName()
           
 RenderStage getRenderStage()
           
 RowData getRowData()
           
 org.apache.myfaces.trinidad.model.RowKeySet getSelectedRowKeys()
          Gets the selection state for this table.
 java.lang.String getSortableHeaderBorderStyle()
           
 int getSpecialColumnCount()
          Computes the number of special columns, including selection, detail and row header.
 javax.faces.component.UIComponent getTable()
          Get the component.
 java.lang.Object getTableHeight()
           
 java.lang.String getTableId()
          Get the table id
 java.lang.Object getTableProperty(java.lang.Object key)
          gets a property that is local to this table.
 java.lang.Object getTableWidth()
           
 boolean hasColumnHeaders()
           
 boolean hasGrid(int before, boolean vertical)
          check to see if this column or row should render a grid before the row or column at the specified index.
 boolean hasNavigation()
           
 boolean hasSelectAll()
          Does this table have "select all/none"?
 boolean hasSelection()
           
 void install()
           
 boolean isExplicitHeaderIDMode()
          In explicit header ID mode, all table data cells have a headers attribute that lists the IDs of all the headers that apply to that data cell.
 boolean isImmediate()
          Is this table validated on navigation?
static boolean isInsideContentOfTable()
           
 boolean isRowHidden(int index)
           
 void release()
           
 void setDetailColumnIndex(int physicalIndex)
          sets the physical index of the details column
 void setExplicitHeaderIDMode(boolean isEnabled)
          Enables/Disables explicit header ID mode.
 void setHeaderNodeList(java.lang.Object nodeList)
          Returns the opaque nodeList object used by column groups to store the header structure.
 void setRowHidden(int index)
           
 java.lang.Object setTableProperty(java.lang.Object key, java.lang.Object value)
          sets a property that is local to this table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL_COLUMN

public static final int NORMAL_COLUMN
Constant indicating that this column is visible

See Also:
Constant Field Values

HIDDEN_COLUMN

public static final int HIDDEN_COLUMN
Constant indicating that this column is not rendered

See Also:
Constant Field Values

USER_INVISIBLE_COLUMN

public static final int USER_INVISIBLE_COLUMN
Constant indicating that this column is a user-invisible column

See Also:
Constant Field Values

DONT_KNOW

public static final int DONT_KNOW
Indicates that a row or column count is not known.

See Also:
Constant Field Values
Constructor Detail

TableRenderingContext

public TableRenderingContext(javax.faces.context.FacesContext context,
                             org.apache.myfaces.trinidad.context.RenderingContext arc,
                             javax.faces.component.UIComponent component)
Method Detail

getCurrentInstance

public static TableRenderingContext getCurrentInstance()

install

public void install()

release

public void release()

getJSVarName

public final java.lang.String getJSVarName()

getRenderStage

public final RenderStage getRenderStage()

getTableWidth

public final java.lang.Object getTableWidth()

getTableHeight

public final java.lang.Object getTableHeight()

setExplicitHeaderIDMode

public final void setExplicitHeaderIDMode(boolean isEnabled)
Enables/Disables explicit header ID mode. The default is disabled.


isExplicitHeaderIDMode

public final boolean isExplicitHeaderIDMode()
In explicit header ID mode, all table data cells have a headers attribute that lists the IDs of all the headers that apply to that data cell.

Returns:
true if explicit header ID mode is turned on.

getTable

public final javax.faces.component.UIComponent getTable()
Get the component.


getTableId

public final java.lang.String getTableId()
Get the table id


getCollectionComponent

public final org.apache.myfaces.trinidad.component.CollectionComponent getCollectionComponent()
Get the CollectionComponent


getSelectedRowKeys

public org.apache.myfaces.trinidad.model.RowKeySet getSelectedRowKeys()
Gets the selection state for this table. This is overwritten in HGridRenderingContext


isImmediate

public final boolean isImmediate()
Is this table validated on navigation?


hasNavigation

public final boolean hasNavigation()
Returns:
true iff this table needs a navigation bar

getColumnWidth

public final java.lang.Object getColumnWidth(int physicalIndex)
Returns:
the width of the specified column

hasColumnHeaders

public final boolean hasColumnHeaders()
Returns:
true if any of these columns require column header stamps
See Also:
columnHeadersPresent()

columnHeadersPresent

public final void columnHeadersPresent()
indicates that this table has column headers, so the tableRenderer must render the table's columnHeader region.

See Also:
hasColumnHeaders()

setDetailColumnIndex

public final void setDetailColumnIndex(int physicalIndex)
sets the physical index of the details column


getDetailColumnIndex

public final int getDetailColumnIndex()
gets the physical index of the details column


getDetail

public javax.faces.component.UIComponent getDetail()
Get the detail node (hide/show)


setRowHidden

public final void setRowHidden(int index)

isRowHidden

public final boolean isRowHidden(int index)

hasSelectAll

public final boolean hasSelectAll()
Does this table have "select all/none"?


hasSelection

public final boolean hasSelection()

getHiddenColumns

public final int[] getHiddenColumns()
Get a boolean array of columns, with true representing each hidden column.


getColumnCount

public int getColumnCount()
Get the count of indexed children.


getActualColumnCount

public final int getActualColumnCount()
Get the actual column count. This is the actual number of physical columns in the table. It is the sum of the visible columns and any special columns. This calls getSpecialColumnCount and caches the result.


getSpecialColumnCount

public int getSpecialColumnCount()
Computes the number of special columns, including selection, detail and row header.


getBanding

public final BandingData getBanding()

getColumnData

public final ColumnData getColumnData()

getRowData

public final RowData getRowData()

hasGrid

public boolean hasGrid(int before,
                       boolean vertical)
check to see if this column or row should render a grid before the row or column at the specified index.

Parameters:
before - the index of the row or the physicalIndex of the column
vertical - true for columns (vertical grids), false for rows (horizontal grids).
Returns:
true for grid. false if no grid.

getSortableHeaderBorderStyle

public java.lang.String getSortableHeaderBorderStyle()

getHeaderNodesList

public java.lang.Object getHeaderNodesList()
Returns the opaque nodeList object used by column groups to store the header structure.


setHeaderNodeList

public void setHeaderNodeList(java.lang.Object nodeList)
Returns the opaque nodeList object used by column groups to store the header structure.


isInsideContentOfTable

public static boolean isInsideContentOfTable()

getTableProperty

public final java.lang.Object getTableProperty(java.lang.Object key)
gets a property that is local to this table. Compare this to RenderingContext.getProperty(). That method returns a global property. this method is used to support nested tables.


setTableProperty

public final java.lang.Object setTableProperty(java.lang.Object key,
                                               java.lang.Object value)
sets a property that is local to this table. Compare this to RenderingContext.setProperty(). That method sets a global property. this method is used to support nested tables.

Returns:
the previous value (if any).


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.