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

java.lang.Object
  extended by org.apache.hivemind.impl.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:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IComponent, IDirectEvent, Component, IRender, ITemplateComponent

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 ]

Author:
mindbridge

Field Summary
static String TABLE_VALUE_CSS_CLASS_SUFFIX
           
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
TableValues()
           
 
Method Summary
protected  void cleanupAfterRender(IRequestCycle cycle)
          Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)after the component renders.
abstract  String getCellClass()
           
 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.
abstract  void setColumnParameter(ITableColumn column)
           
 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, getContainedRenderers, getInnerRenderers, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, enterActiveState, equals, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
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

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

cleanupAfterRender

protected void cleanupAfterRender(IRequestCycle cycle)
Description copied from class: AbstractComponent
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)after the component renders.

Overrides:
cleanupAfterRender in class AbstractComponent
Since:
4.0

setColumnParameter

public abstract void setColumnParameter(ITableColumn column)
Since:
4.0

getCellClass

public abstract String getCellClass()
Since:
4.0


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.