WACT_COMPONENT
[ class tree: WACT_COMPONENT ] [ index: WACT_COMPONENT ] [ all elements ]

Class: DataTableComponent

Source Location: /framework/template/components/data/data_table.inc.php

Class Overview

Component
   |
   --DataSourceComponent
      |
      --ListComponent
         |
         --DataTableComponent

run-time component for the Data:Table tag

Variables

Methods


Inherited Variables

Inherited Methods

Class: ListComponent

ListComponent::ensureDataSourceAvailable()
ListComponent::prepare()
Prepares the list for iteration, creating an EmptyDataSet if no data set has been registered then calling the dataset reset method.
ListComponent::registerDataSet()
Registers a dataset with the list component.

Class: DataSourceComponent

DataSourceComponent::ensureDataSourceAvailable()
DataSourceComponent::get()
DataSourceComponent::getDataSource()
DataSourceComponent::prepare()
DataSourceComponent::registerDataSource()
Registers a DataSource with this component
DataSourceComponent::set()

Class: Component

Component::addChild()
Adds a reference to a child component to this component, using it's ID attribute as the child array key
Component::findChild()
Returns a child component given it's ID.
Component::findChildByClass()
Returns the first child component matching the supplied WACT_TEMPLATE Component PHP class name
Component::findParentByClass()
Recursively searches through parents of this component searching for a given WACT_TEMPLATE component PHP class name
Component::getChild()
Same as find child, except raises error if child is not found
Component::getServerId()
Returns the ID of the component, as defined in the template tags ID attribute
Component::render()
Outputs the component, rendering any child components as well This method will only ever be called on components that support Dynamic rendering.
Component::setChildDataSource()
set the data source of a child component, or raise an error if the child is not found.

Class Details

run-time component for the Data:Table tag
author:  Jason E. Sweat <jsweat_php AT yahoo DOT com>

Class Variables


$columns = array()

var:  registry for column componenets as hash map of 'column name' => &column component
access:  private
Type:   array

$groups = array()

var:  registry for group componenets
access:  private
Type:   array

$rowAttribs =

var:  row attributes
Type:   string

$RowCount = 0

var:  count of rows processed
Type:   integer

$rowCssClassFilter =

var:  class filter
access:  private
Type:   row

Class Methods


method addColumn

will register a column component with the table if none exists

void addColumn( string $column, DataColumnComponent 1)

API Tags:

access:  protected

Parameters:

DataColumnComponent   1  
string   $column   column name identifier

method colCount

return the nubmer of visible columns

integer colCount( )

API Tags:

access:  public

method genColFooters

generate table footers

void genColFooters( mixed &$TabDataSource, mixed &$TplDataSource)

API Tags:

access:  protected

method genHeaders

generate table headings

void genHeaders( mixed &$TabDataSource, mixed &$TplDataSource)

API Tags:

access:  protected

method genSafeColId

store the id of the tag and name of a column, transformed to be identifier safe

void genSafeColId( mixed $column)

API Tags:

access:  private

method getColumnByName

return a column object by name

DataColumnComponent &getColumnByName( string $column)

API Tags:

access:  public

Parameters:

string   $column   the column id

method getColumnKeys

return the list of keys for generation of columns

array getColumnKeys( )

API Tags:

access:  protected

method openTableRow

opens a table row

void openTableRow( DataSource &$DataSource)

API Tags:

access:  public

Parameters:

DataSource   &$DataSource   the template data source

method prepare

Prepares the list for iteration, creating an EmptyDataSet if no data set has been registered then calling the dataset reset method.

void prepare( )

API Tags:

access:  protected
see:  EmptyDataSet
Overrides ListComponent::prepare() (Prepares the list for iteration, creating an EmptyDataSet if no data set has been registered then calling the dataset reset method.)

method registerColumn

register a column component with the table

void registerColumn( string $column, DataColumnComponent &$columnComponent)

API Tags:

access:  protected

Parameters:

string   $column   column name identifier
DataColumnComponent   &$columnComponent  

method registerGroup

register a group component with the table

void registerGroup( DataGroupComponent &$groupComponent)

API Tags:

access:  protected

Parameters:

DataGroupComponent   &$groupComponent  

method registerRowCssClassFilter

register a column component with the table

void registerRowCssClassFilter( object &$filter)

API Tags:

access:  public

Parameters:

object   &$filter   the row class filter

method renderRow

renders a table row

void renderRow( DataSource &$DataSource)

API Tags:

access:  protected

Parameters:

DataSource   &$DataSource   the template data space

method setRowAttrib

set the row attributes for this table

void setRowAttrib( string $attribs)

API Tags:

access:  public

Parameters:

string   $attribs   the row attributes
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:45:24 -0800 by phpDocumentor 1.2.3