## P4A_Table

Description

Tabular rapresentation of a data source.

This is a complex widget that's used to allow users to navigate data sources and than (for example) edit a record or view details etc...

- author: Andrea Giardina <andrea.giardina@crealabs.it>
- author: Fabrizio Balliano <fabrizio.balliano@crealabs.it>

Located in /p4a/objects/widgets/table.php (line 47)

    P4A_Object
       |
       --P4A_Widget
          |
          --P4A_Table

Variable Summary
array $cols
data_source $data
table_navigation_bar $navigation_bar
rows $rows
toolbar $toolbar
boolean $_auto_navigation_bar
boolean $_show_headers
string $_title
Method Summary
P4A_Table P4A_Table (string $name)
void addCol (string $column_name)
void addNavigationBar ()
void addToolbar (mixed &$toolbar)
void getAsString ()
array getCols ()
array getInvisibleCols ()
string getTitle ()
array getVisibleCols ()
void hideHeaders ()
void hideNavigationBar ()
void hideToolbar ()
void newToolbar (mixed $toolbar)
void setDataStructure (array $array_fields)
void setInvisibleCols ([mixed $cols = array()])
void setSource (data_source &$data_source)
void setTitle (string $title)
void setVisibleCols ([mixed $cols = array()])
void showHeaders ()
void showNavigationBar ()
void showTitleBar ()
void showToolbar ()
Variables
array $cols = array() (line 89)

Stores the table's structure (table_cols).

- access: public

data_source $data = NULL (line 54)

Data source associated with the table.

- access: private

table_navigation_bar $navigation_bar = NULL (line 61)

The gui widgets to allow table navigation.

- access: private

rows $rows = NULL (line 75)

All the table's rows.

- access: public

toolbar $toolbar = NULL (line 68)

The table toolbar.

- access: private

boolean $_auto_navigation_bar = TRUE (line 103)

Automatically add the navigation bar?

- access: private

boolean $_show_headers = TRUE (line 82)

Decides if the table will show the "field's header" row.

- access: private

string $_title = "" (line 96)

A title (caption) for the table.

- access: private

#### Inherited Variables

Inherited from P4A_Widget

> P4A_Widget::$actions
> P4A_Widget::$enabled
> P4A_Widget::$label
> P4A_Widget::$map_actions
> P4A_Widget::$properties
> P4A_Widget::$style
> P4A_Widget::$template_name
> P4A_Widget::$use_template
> P4A_Widget::$value
> P4A_Widget::$visible
> P4A_Widget::$_temp_vars

Inherited from P4A_Object

> P4A_Object::$_id
> P4A_Object::$_map_actions
> P4A_Object::$_name
> P4A_Object::$_objects
> P4A_Object::$_parent_id

Methods
Constructor P4A_Table (line 110)

Class constructor.

- access: private

P4A_Table P4A_Table (string $name)

- string $name: Mnemonic identifier for the object.

addCol (line 172)

Adds a column to the data structure.

- access: public

void addCol (string $column_name)

- string $column_name: Column name.

addNavigationBar (line 332)

Adds the navigation bar to the table.

- access: public

void addNavigationBar ()
addToolbar (line 296)

Adds a generic toolbar to the table.

- access: public

void addToolbar (mixed &$toolbar)
getAsString (line 181)

Returns the HTML rendered object.

- access: public

void getAsString ()

Redefinition of:

P4A_Widget::getAsString()
  Returns the HTML rendered widget.

getCols (line 398)

Return an array with all columns id.

- access: public

array getCols ()
getInvisibleCols (line 426)

Return an array with all id of invisible columns.

- access: public

array getInvisibleCols ()
getTitle (line 132)

Returns the title of the table.

- access: public

string getTitle ()
getVisibleCols (line 408)

Return an array with all id of visible columns.

- access: public

array getVisibleCols ()
hideHeaders (line 388)

Sets the header row hidden

- see: P4A_Table::$_show_headers
- access: public

void hideHeaders ()
hideNavigationBar (line 354)

Makes the navigation bar hidden.

- access: public

void hideNavigationBar ()
hideToolbar (line 319)

Makes the toolbar invisible.

- access: public

void hideToolbar ()
newToolbar (line 286)

TO BE IMPLEMENTED

void newToolbar (mixed $toolbar)
setDataStructure (line 158)

Sets the table's structure (fields).

- access: public

void setDataStructure (array $array_fields)

- array $array_fields: All the fields.

setInvisibleCols (line 467)

Sets all passed columns invisible.

If no array is given, than sets all columns invisible.

- access: public

void setInvisibleCols ([mixed $cols = array()])
setSource (line 142)

Sets the data source that the table will navigate.

- access: public

void setSource (data_source &$data_source)

- data_source &$data_source: The data source.

setTitle (line 122)

Sets the title for the table

- see: $title
- access: public

void setTitle (string $title)

- string $title: The title.

setVisibleCols (line 445)

Sets all passed columns visible.

If no array is given, than sets all columns visible.

- access: public

void setVisibleCols ([mixed $cols = array()])
showHeaders (line 378)

Sets the title bar hidden

- access: public

void showHeaders ()
showNavigationBar (line 341)

Makes the navigation bar visible.

- access: public

void showNavigationBar ()
showTitleBar (line 366)

Sets the title bar visible

- access: public

void showTitleBar ()
showToolbar (line 306)

Makes the toolbar visible.

- access: public

void showToolbar ()

#### Inherited Methods

Inherited From P4A_Widget

> P4A_Widget::addAction()
> P4A_Widget::addTempVar()
> P4A_Widget::changeEvent()
> P4A_Widget::clearTemplateVars()
> P4A_Widget::clearTempVars()
> P4A_Widget::composeStringActions()
> P4A_Widget::composeStringClassStyle()
> P4A_Widget::composeStringProperties()
> P4A_Widget::composeStringStyle()
> P4A_Widget::disable()
> P4A_Widget::display()
> P4A_Widget::dropAction()
> P4A_Widget::dropTempVar()
> P4A_Widget::enable()
> P4A_Widget::fetchTemplate()
> P4A_Widget::getAccessKey()
> P4A_Widget::getAsString()
> P4A_Widget::getHeight()
> P4A_Widget::getLabel()
> P4A_Widget::getProperty()
> P4A_Widget::getStyleProperty()
> P4A_Widget::getValue()
> P4A_Widget::getWidth()
> P4A_Widget::isEnabled()
> P4A_Widget::isVisible()
> P4A_Widget::onChange()
> P4A_Widget::onClick()
> P4A_Widget::onKeyPress()
> P4A_Widget::onMouseOver()
> P4A_Widget::onReturnPress()
> P4A_Widget::p4a_widget()
> P4A_Widget::raise()
> P4A_Widget::requireConfirmation()
> P4A_Widget::setAccessKey()
> P4A_Widget::setBgcolor()
> P4A_Widget::setBgimage()
> P4A_Widget::setDefaultLabel()
> P4A_Widget::setFontColor()
> P4A_Widget::setFontWeight()
> P4A_Widget::setHeight()
> P4A_Widget::setInvisible()
> P4A_Widget::setLabel()
> P4A_Widget::setProperty()
> P4A_Widget::setStyleProperty()
> P4A_Widget::setValue()
> P4A_Widget::setVisible()
> P4A_Widget::setWidth()
> P4A_Widget::unrequireConfirmation()
> P4A_Widget::unsetProperty()
> P4A_Widget::unsetStyleProperty()
> P4A_Widget::useTemplate()

Inherited From P4A_Object

> P4A_Object::actionHandler()
> P4A_Object::build()
> P4A_Object::destroy()
> P4A_Object::errorHandler()
> P4A_Object::getId()
> P4A_Object::getName()
> P4A_Object::getObjectType()
> P4A_Object::getParentID()
> P4A_Object::implementMethod()
> P4A_Object::intercept()
> P4A_Object::isActionTriggered()
> P4A_Object::p4a_object()
> P4A_Object::setName()
> P4A_Object::setParentID()
> P4A_Object::void()

Documentation generated on Fri, 26 May 2006 12:43:37 +0200 by phpDocumentor 1.3.0RC5