Source for file TableWidget.php
Documentation is available at TableWidget.php
define('LAYOUT_GENERATOR','TableWidgetLayout');
//generate the record widget
* This file was generated by the Alia Toolkit. For more information, please see alia.sourceforge.net
private $recordsPerPage = 15;
function __construct($page=1){
$this->defineSignal("nextPage");
throw new Exception("$page is not a valid page number!");
function setRecordsPerPage($count){
if(! is_int($count) || $count <1){
throw new Exception("$count is not a valid positive number!");
$this->recordsPerPage = $count;
$this->records = Doctrine_Query::create()
->from(self::recordClass." a")
->limit($this->recordsPerPage." OFFSET ". ($this->page - 1)*$this->recordsPerPage )
* builds the layout and widgets that go in it.
//delete all the old widgets, if any
$widgets = $this->getLayout()->getWidgets();
foreach($widgets as $k=>$widget){
$widget->clearConnections();
//AObjectRegistry::instance()->unsetObject($widgets[$k]);
$layout = $this->getLayout();
$layout = new AHTMLLayout($this,"/templates/'.
CRUD_WIDGET.
'Edit.tpl");
$this->setLayout($layout);
foreach($this->records as $record){
$layout->addWidget($widget);
$button = new APushButton("<< Prev");
$layout->addWidget($button,"prevButton");
Alia::connect($button,"clicked",$this,"previousPage");
$button = new APushButton("Next >>");
$layout->addWidget($button,"nextButton");
Alia::connect($button,"clicked",$this,"nextPage");
public function nextPage(){
public function previousPage(){
function changePage($direction){
if($this->page <2 && $direction < 0){
$this->setpage($this->page + $direction);
Documentation generated on Fri, 11 Jul 2008 13:28:45 -0400 by phpDocumentor 1.4.2