Agile Toolkit  4.2
Agile Toolkit is a powerful web development framework. Inspired by GUI Applications development
CompleteLister Class Reference
Inheritance diagram for CompleteLister:
Lister View AbstractView AbstractObject Grid_Basic Menu_Basic Paginator_Basic Grid_Advanced Menu Paginator Grid InfoWindow MVCGrid

Public Member Functions

 init ()
 addTotals ($fields=null)
 updateTotals ()
 formatTotalsRow ()
 formatRow ()
 renderRows ()
 render ()
 defaultTemplate ()

Data Fields

 $totals = false
 $totals_t = false

Protected Attributes

 $item_tag = 'row'
 $container_tag = 'rows'
 $row_t
 $odd_even = null

Detailed Description

CompleteLister is very similar to regular Lister, but will use <?rows?><?row?>blah<?/?><?/?> structrue inside template. Also adds support for totals.

Use: $list=$this->add('CompleteLister'); $list->setModel('User'); $list->addTotals(); Template (view/users.html): Users <?rows?> <?row?>

<?$name?>

<?$desc?> <?/row?>

Joe Blogs

Sample template. Will be ignored <?/rows?> <?totals?> <?$row_count?> user<?$plural_s?>. <?/?>

See http://agiletoolkit.org/about/license


Member Function Documentation

addTotals ( fields = null)

Enable total calculation for specified array of fields. If not specified, all field totals are calculated

Redefine to return default template, when 4th argument of add() is omitted

Reimplemented from Lister.

Reimplemented in Paginator_Basic, Grid_Advanced, Menu_Basic, Grid_Basic, and InfoWindow.

formatRow ( )

Redefine and change $this->current_row to format data before it appears

Reimplemented from Lister.

Reimplemented in Grid_Basic.

Additional formatting for Totals row

Reimplemented in Grid_Advanced.

init ( )

Initialize object. Always call parent

This method is called for initialization

Reimplemented from AbstractObject.

Reimplemented in Grid_Advanced, Menu_Basic, Grid_Basic, InfoWindow, and Paginator_Basic.

render ( )

Default render. Generates HTML presentation of the view based on $this->template and passes it to output() function which then inserts output into parent's template

For visual objects, their default action while rendering is rely on SMlite engine. For sake of simplicity and speed you can redefine this method with a simple call

Reimplemented from Lister.

Reimplemented in Grid_Advanced, Menu_Basic, and InfoWindow.

Reimplemented in Grid_Basic.

Update totals on rows. Called at the start of formatRow()

Reimplemented in Grid_Advanced.


Field Documentation

$container_tag = 'rows' [protected]

Reimplemented in Menu_Basic.

$item_tag = 'row' [protected]

Reimplemented in Menu_Basic.

$odd_even = null [protected]
$row_t [protected]
$totals = false

Will contain accumulated totals for all fields

$totals_t = false

Will be initialized to "totals" template when addTotals() is called

Reimplemented in Grid_Advanced.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations