Class 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...

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
 array $_cols_order
 boolean $_show_headers
 string $_title
Method Summary
 P4A_Table P4A_Table (string $name)
 void addActionCol (string $column_name)
 void addCol (string $column_name)
 void addToolbar ( &$toolbar)
 void getAsString ()
 array getCols ()
 array getInvisibleCols ()
 string getTitle ()
 array getVisibleCols ()
 void hideHeaders ()
 void hideToolbar ()
 void newToolbar ( $toolbar)
 void setCurrentPageNumber ( $page)
 void setDataStructure (array $array_fields)
 void setInvisibleCols ([ $cols = array()])
 void setSource (data_source &$data_source)
 void setTitle (string $title)
 void setVisibleCols ([ $cols = array()])
 void showHeaders ()
 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 110)

Automatically add the navigation bar?

  • access: private
array $_cols_order = array() (line 96)

Displaying order of columns.

  • access: private
integer $_current_page_number = 1 (line 117)

Wich page is shown?

  • access: private
boolean $_show_headers = true (line 82)

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

  • access: private
string $_title = "" (line 103)

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
P4A_Widget::$_tpl_vars

Inherited from P4A_Object

P4A_Object::$_helpers
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
Methods
Constructor P4A_Table (line 124)

Class constructor.

  • access: private
P4A_Table P4A_Table (string $name)
  • string $name: Mnemonic identifier for the object.
addActionCol (line 200)

Adds a special clickable column.

  • access: public
void addActionCol (string $column_name)
  • string $column_name: Column name.
addCol (line 186)

Adds a column to the data structure.

  • access: public
void addCol (string $column_name)
  • string $column_name: Column name.
addNavigationBar (line 370)

Adds the navigation bar to the table.

  • access: public
void addNavigationBar ()
addToolbar (line 334)

Adds a generic toolbar to the table.

  • access: public
void addToolbar ( &$toolbar)
  • &$toolbar
getAsString (line 212)

Returns the HTML rendered object.

  • access: public
void getAsString ()

Redefinition of:
P4A_Widget::getAsString()
Returns the HTML rendered widget.
getCols (line 436)

Return an array with all columns id.

  • access: public
array getCols ()
getCurrentPageNumber (line 535)

Returns the current page number

  • access: public
integer getCurrentPageNumber ()
getInvisibleCols (line 472)

Return an array with all id of invisible columns.

  • access: public
array getInvisibleCols ()
getTitle (line 146)

Returns the title of the table.

  • access: public
string getTitle ()
getVisibleCols (line 446)

Return an array with all id of visible columns.

  • access: public
array getVisibleCols ()
hideHeaders (line 426)

Sets the header row hidden

void hideHeaders ()
hideNavigationBar (line 392)

Makes the navigation bar hidden.

  • access: public
void hideNavigationBar ()
hideToolbar (line 357)

Makes the toolbar invisible.

  • access: public
void hideToolbar ()
newToolbar (line 324)

TO BE IMPLEMENTED

void newToolbar ( $toolbar)
  • $toolbar
setCurrentPageNumber (line 545)

Sets the current page number

  • access: public
void setCurrentPageNumber ( $page)
  • $page
setDataStructure (line 172)

Sets the table's structure (fields).

  • access: public
void setDataStructure (array $array_fields)
  • array $array_fields: All the fields.
setInvisibleCols (line 515)

Sets all passed columns invisible.

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

  • access: public
void setInvisibleCols ([ $cols = array()])
  • $cols
setSource (line 156)

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 136)

Sets the title for the table

  • see: $title
  • access: public
void setTitle (string $title)
  • string $title: The title.
setVisibleCols (line 491)

Sets all passed columns visible.

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

  • access: public
void setVisibleCols ([ $cols = array()])
  • $cols
showHeaders (line 416)

Sets the title bar hidden

  • access: public
void showHeaders ()
showNavigationBar (line 379)

Makes the navigation bar visible.

  • access: public
void showNavigationBar ()
showTitleBar (line 404)

Sets the title bar visible

  • access: public
void showTitleBar ()
showToolbar (line 344)

Makes the toolbar visible.

  • access: public
void showToolbar ()
syncPageWithSource (line 554)

Sets the page number reading it from the data source

  • access: public
void syncPageWithSource ()

Inherited Methods

Inherited From P4A_Widget

 P4A_Widget::addAction()
 P4A_Widget::addAjaxAction()
 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::onBlur()
 P4A_Widget::onChange()
 P4A_Widget::onClick()
 P4A_Widget::onDblClick()
 P4A_Widget::onFocus()
 P4A_Widget::onKeyDown()
 P4A_Widget::onKeyPress()
 P4A_Widget::onKeyUp()
 P4A_Widget::onMouseDown()
 P4A_Widget::onMouseMove()
 P4A_Widget::onMouseOver()
 P4A_Widget::onMouseUp()
 P4A_Widget::onReturnPress()
 P4A_Widget::onSelect()
 P4A_Widget::p4a_widget()
 P4A_Widget::raise()
 P4A_Widget::redesign()
 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::dropIntercept()
 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()
 P4A_Object::_loadHelper()
 P4A_Object::__call()

Documentation generated on Mon, 07 Jan 2008 11:29:33 +0100 by phpDocumentor 1.4.0