Menu

#155 EnableViewState=false bug in TListControl

v2.0
open
nobody
5
2006-02-13
2006-02-13
No

loadViewState and saveViewState do not function
properly when EnableViewState is set to false for
TListControl.

They should function as follows:

public function loadViewState($viewState)
{
parent::loadViewState($viewState);
if($this->isViewStateEnabled())
{
$this->items=$this->getViewState('Items',new
TCollection());
}
}

public function saveViewState()
{
if($this->isViewStateEnabled())
{
if($this->items->length()>0)
$this->setViewState('Items',$this->items);
}
return parent::saveViewState();
}

Discussion


Log in to post a comment.