org.richfaces.renderkit
Class AbstractTableRenderer
java.lang.Object
javax.faces.render.Renderer
org.ajax4jsf.renderkit.RendererBase
org.ajax4jsf.renderkit.HeaderResourcesRendererBase
org.richfaces.renderkit.AbstractRowsRenderer
org.richfaces.renderkit.AbstractTableRenderer
- All Implemented Interfaces:
- org.ajax4jsf.model.DataVisitor, org.ajax4jsf.renderkit.ChameleonRenderer, org.ajax4jsf.renderkit.HeaderResourceProducer, org.ajax4jsf.resource.ResourceProduser
- Direct Known Subclasses:
- DataTableRenderer, SubTableRenderer
public abstract class AbstractTableRenderer
- extends AbstractRowsRenderer
- Author:
- shura
Fields inherited from class org.ajax4jsf.renderkit.RendererBase |
JAVASCRIPT_NAMESPACE |
Method Summary |
protected void |
addInplaceInput(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent column,
java.lang.String buffer)
|
protected java.lang.String |
buildAjaxFunction(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent column,
boolean sortable)
|
protected int |
calculateRowColumns(java.util.Iterator<javax.faces.component.UIComponent> col)
Calculate max number of columns per row. |
protected void |
doDecode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
encodeFooter(javax.faces.context.FacesContext context,
UIDataTable table,
int columns)
|
void |
encodeHeader(javax.faces.context.FacesContext context,
UIDataTable table,
int numberOfColumns)
|
protected void |
encodeHeaderFacets(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter writer,
java.util.Iterator<javax.faces.component.UIComponent> headers,
java.lang.String skinCellClass,
java.lang.String headerClass,
java.lang.String facetName,
java.lang.String element,
int colCount)
|
void |
encodeOneRow(javax.faces.context.FacesContext context,
TableHolder holder)
|
protected void |
encodeRowStart(javax.faces.context.FacesContext context,
java.lang.String skinClass,
java.lang.String rowClass,
UIDataTable table,
javax.faces.context.ResponseWriter writer)
|
protected void |
encodeRowStart(javax.faces.context.FacesContext context,
java.lang.String rowClass,
UIDataTable table,
javax.faces.context.ResponseWriter writer)
|
void |
encodeScriptIfNecessary(javax.faces.context.FacesContext context,
UIDataTable component)
|
void |
encodeTableStructure(javax.faces.context.FacesContext context,
UIDataTable table)
Encode all table structure - colgroups definitions, caption, header,
footer |
protected java.lang.String |
getCellSkinClass()
|
protected int |
getColumnsCount(UIDataTable table)
Calculate total number of columns in table. |
protected java.lang.String |
getFirstRowSkinClass()
|
protected java.lang.String |
getRowSkinClass()
|
boolean |
isColumnFacetPresent(UIDataTable table,
java.lang.String facetName)
|
protected boolean |
isColumnRendered(javax.faces.component.UIComponent component)
|
boolean |
isHeaderFactoryColumnAttributePresent(UIDataTable table,
java.lang.String attributeName)
Returns true if specified attribute (when present on the column)
should generate header even if it is not specified on the table |
Methods inherited from class org.richfaces.renderkit.AbstractRowsRenderer |
doCleanup, encodeCaption, encodeCellChildren, encodeChildren, encodeRowEvents, encodeRows, encodeRows, encodeStyle, encodeStyleClass, encodeTableHeaderFacet, getRendersChildren, process |
Methods inherited from class org.ajax4jsf.renderkit.HeaderResourcesRendererBase |
encodeResourcesArray, getHeaderScripts, getHeaderStyles, getScripts, getStyles, preEncodeBegin |
Methods inherited from class org.ajax4jsf.renderkit.RendererBase |
addResource, decode, doEncodeBegin, doEncodeChildren, doEncodeEnd, encodeBegin, getComponentClass, getResource, getSkin, getUtils, preDecode, renderChild, renderChildren |
Methods inherited from class javax.faces.render.Renderer |
convertClientId, getConvertedValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTableRenderer
public AbstractTableRenderer()
encodeTableStructure
public void encodeTableStructure(javax.faces.context.FacesContext context,
UIDataTable table)
throws java.io.IOException
- Encode all table structure - colgroups definitions, caption, header,
footer
- Parameters:
context
- table
-
- Throws:
java.io.IOException
encodeHeader
public void encodeHeader(javax.faces.context.FacesContext context,
UIDataTable table,
int numberOfColumns)
throws java.io.IOException
- Throws:
java.io.IOException
isColumnFacetPresent
public boolean isColumnFacetPresent(UIDataTable table,
java.lang.String facetName)
isHeaderFactoryColumnAttributePresent
public boolean isHeaderFactoryColumnAttributePresent(UIDataTable table,
java.lang.String attributeName)
- Returns true if specified attribute (when present on the column)
should generate header even if it is not specified on the table
- Parameters:
table
- - rendered UIDataTableattributeName
- - attribute name
- Returns:
- true if specified attribute should generate header on the table
isColumnRendered
protected boolean isColumnRendered(javax.faces.component.UIComponent component)
- Parameters:
component
-
- Returns:
encodeHeaderFacets
protected void encodeHeaderFacets(javax.faces.context.FacesContext context,
javax.faces.context.ResponseWriter writer,
java.util.Iterator<javax.faces.component.UIComponent> headers,
java.lang.String skinCellClass,
java.lang.String headerClass,
java.lang.String facetName,
java.lang.String element,
int colCount)
throws java.io.IOException
- Throws:
java.io.IOException
encodeFooter
public void encodeFooter(javax.faces.context.FacesContext context,
UIDataTable table,
int columns)
throws java.io.IOException
- Throws:
java.io.IOException
encodeOneRow
public void encodeOneRow(javax.faces.context.FacesContext context,
TableHolder holder)
throws java.io.IOException
- Specified by:
encodeOneRow
in class AbstractRowsRenderer
- Throws:
java.io.IOException
encodeRowStart
protected void encodeRowStart(javax.faces.context.FacesContext context,
java.lang.String rowClass,
UIDataTable table,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
- Throws:
java.io.IOException
getRowSkinClass
protected java.lang.String getRowSkinClass()
- Returns:
getFirstRowSkinClass
protected java.lang.String getFirstRowSkinClass()
- Returns:
getCellSkinClass
protected java.lang.String getCellSkinClass()
- Returns:
encodeRowStart
protected void encodeRowStart(javax.faces.context.FacesContext context,
java.lang.String skinClass,
java.lang.String rowClass,
UIDataTable table,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
- Throws:
java.io.IOException
getColumnsCount
protected int getColumnsCount(UIDataTable table)
- Calculate total number of columns in table.
- Parameters:
context
- table
-
- Returns:
calculateRowColumns
protected int calculateRowColumns(java.util.Iterator<javax.faces.component.UIComponent> col)
- Calculate max number of columns per row. For rows, recursive calculate
max length.
- Parameters:
col
- -
Iterator other all columns in table.
- Returns:
encodeScriptIfNecessary
public void encodeScriptIfNecessary(javax.faces.context.FacesContext context,
UIDataTable component)
throws java.io.IOException
- Throws:
java.io.IOException
doDecode
protected void doDecode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
- Overrides:
doDecode
in class org.ajax4jsf.renderkit.RendererBase
encodeEnd
public void encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Overrides:
encodeEnd
in class org.ajax4jsf.renderkit.RendererBase
- Throws:
java.io.IOException
addInplaceInput
protected void addInplaceInput(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent column,
java.lang.String buffer)
throws java.io.IOException
- Throws:
java.io.IOException
buildAjaxFunction
protected java.lang.String buildAjaxFunction(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent column,
boolean sortable)
Copyright © 2008. All Rights Reserved.