org.apache.tapestry.contrib.table.components
Class TableValues

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by org.apache.tapestry.contrib.table.components.AbstractTableViewComponent
                  extended by org.apache.tapestry.contrib.table.components.AbstractTableRowComponent
                      extended by org.apache.tapestry.contrib.table.components.TableValues
All Implemented Interfaces:
IComponent, ILocatable, ILocationHolder, IRender

public abstract class TableValues
extends AbstractTableRowComponent

A low level Table component that generates the columns in the current row in the table. This component must be wrapped by TableRows.

The component iterates over the columns in the table and automatically renders the column values for the current table row. The columns are wrapped in 'td' tags by default.
The column values are rendered using the renderer returned by the getValueRenderer() method in ITableColumn.

Please see the Component Reference for details on how to use this component. [Component Reference]

Version:
$Id: TableValues.java 243808 2004-02-28 10:26:15Z mindbridge $
Author:
mindbridge

Field Summary
static String TABLE_VALUE_CSS_CLASS_SUFFIX
           
 
Constructor Summary
TableValues()
           
 
Method Summary
abstract  IBinding getClassBinding()
           
abstract  IBinding getColumnBinding()
           
 ITableColumn getTableColumn()
          Returns the currently rendered table column.
 Iterator getTableColumnIterator()
          Get the list of all table columns to be displayed.
 IRender getTableValueRenderer()
          Returns the renderer to be used to generate the appearance of the current column
 String getValueClass()
          Returns the CSS class of the generated table cell.
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Renders the top level components contained by the receiver.
 void setTableColumn(ITableColumn tableColumn)
          Sets the currently rendered table column.
 
Methods inherited from class org.apache.tapestry.contrib.table.components.AbstractTableRowComponent
getTableRowSource
 
Methods inherited from class org.apache.tapestry.contrib.table.components.AbstractTableViewComponent
getTableModelSource
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Field Detail

TABLE_VALUE_CSS_CLASS_SUFFIX

public static final String TABLE_VALUE_CSS_CLASS_SUFFIX
See Also:
Constant Field Values
Constructor Detail

TableValues

public TableValues()
Method Detail

getColumnBinding

public abstract IBinding getColumnBinding()

getClassBinding

public abstract IBinding getClassBinding()

getTableColumnIterator

public Iterator getTableColumnIterator()
Get the list of all table columns to be displayed.

Returns:
an iterator of all table columns

getTableColumn

public ITableColumn getTableColumn()
Returns the currently rendered table column. You can call this method to obtain the current column.

Returns:
ITableColumn the current table column

setTableColumn

public void setTableColumn(ITableColumn tableColumn)
Sets the currently rendered table column. This method is for internal use only.

Parameters:
tableColumn - The current table column

getTableValueRenderer

public IRender getTableValueRenderer()
Returns the renderer to be used to generate the appearance of the current column

Returns:
the value renderer of the current column

getValueClass

public String getValueClass()
Returns the CSS class of the generated table cell. It uses the class parameter if it has been bound, or the default value of "[column name]ColumnValue" otherwise.

Returns:
the CSS class of the cell

renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Description copied from class: BaseComponent
Renders the top level components contained by the receiver.

Overrides:
renderComponent in class BaseComponent
See Also:
BaseComponent.renderComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)