## P4A_Table_Col

Description

Keeps the data for a single table column.

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

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

    P4A_Object
       |
       --P4A_Widget
          |
          --P4A_Table_Col

Variable Summary
data_source $data
string $data_description_field
string $data_value_field
boolean $formatted
string $formatter_name
string $format_name
string $header
boolean $orderable
string $_type
Method Summary
P4A_Table_Col P4A_Table_Col (string $name)
string getDescription (string $value)
void getHeader ()
string getSourceDescriptionField ()
string getSourceValueField ()
string getType ()
boolean isFormatted ()
void isOrderable ()
void onClick ()
void setFormat (string $formatter_name, string $format_name)
void setFormatted ([mixed $value = true])
void setHeader (string $header)
void setOrderable ([mixed $orderable = true])
void setSource (data_source &$data_source)
void setSourceDescriptionField (string $name)
void setSourceValueField (string $name)
void setType (string $type)
void unsetFormat ()
void unsetFormatted ()
Variables
data_source $data = NULL (line 503)

Data source for the field.

- access: private

string $data_description_field = NULL (line 517)

The data source member that contains the descriptions for this field.

- access: private

string $data_value_field = NULL (line 510)

The data source member that contains the values for this field.

- access: private

boolean $formatted = true (line 524)

Tells if the fields content is formatted or not.

- access: private

string $formatter_name = NULL (line 531)

The formatter class name for the data field.

- access: private

string $format_name = NULL (line 538)

The format name for the data field.

- access: private

string $header = NULL (line 496)

Keeps the header string.

- access: private

boolean $orderable = true (line 545)

Tells if the table can order by this col

- access: private

string $_type = "text" (line 552)

Type of the column

- 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_Col (line 559)

Class constructor.

- access: private

P4A_Table_Col P4A_Table_Col (string $name)

- string $name: Mnemonic identifier for the object.

getDescription (line 672)

Translate the value with the description

- access: public

string getDescription (string $value)

- string $value: The value to translate

getHeader (line 582)

Returns the header for the column.

- see: P4A_Table_Col::$header
- access: public

void getHeader ()
getSourceDescriptionField (line 661)

Returns the name of the data source member that keeps the field's description.

- access: public

string getSourceDescriptionField ()
getSourceValueField (line 651)

Returns the name of the data source member that keeps the field's value.

- access: public

string getSourceValueField ()
getType (line 773)

Gets the type of the column (text|image)

- access: public

string getType ()
isFormatted (line 691)

Returns true if a formatting format for the field has been set.

- access: public

boolean isFormatted ()
isOrderable (line 753)

Tell if the column is orderable or not

- access: public

void isOrderable ()
onClick (line 778)
void onClick ()

Redefinition of:

P4A_Widget::onClick()
  Wrapper used to add the handling of OnClick action.

setFormat (line 722)

Sets the formatter and format for the column.

This also turns formatting on.
Eg: set_format('numbers', 'decimal')

- access: public

void setFormat (string $formatter_name, string $format_name)

- string $formatter_name: The formatter name.
- string $format_name: The format name.

setFormatted (line 700)

Sets the column as formatted.

- access: public

void setFormatted ([mixed $value = true])
setHeader (line 572)

Sets the header for the column.

- see: P4A_Table_Col::$header
- access: public

void setHeader (string $header)

- string $header: The header

setOrderable (line 744)

Sets the ability to order by this column

- access: public

void setOrderable ([mixed $orderable = true])
setSource (line 594)

If we use fields like combo box we have to set a data source.

By default we'll take the data source primary key as value field and the first fiels (not pk) as description.

- access: public

void setSource (data_source &$data_source)

- data_source &$data_source: The data source.

setSourceDescriptionField (line 639)

Sets what data source member is the keeper of the field's description.

- access: public

void setSourceDescriptionField (string $name)

- string $name: The name of the data source member.

setSourceValueField (line 627)

Sets what data source member is the keeper of the field's value.

- access: public

void setSourceValueField (string $name)

- string $name: The name of the data source member.

setType (line 763)

Sets the type of the column (text|image)

- access: public

void setType (string $type)

- string $type

unsetFormat (line 733)

Removes formatting options and turns formatting off.

- access: public

void unsetFormat ()
unsetFormatted (line 709)

Sets the column as not formatted.

- access: public

void unsetFormatted ()

#### 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:39 +0200 by phpDocumentor 1.3.0RC5