From d43420201b1ed45574886e4a94f3f904bd4ea517 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 9 Apr 2007 02:44:50 +0000 Subject: Implemented IDataRenderer for TListControl. --- framework/Web/UI/WebControls/TDataBoundControl.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'framework/Web/UI/WebControls/TDataBoundControl.php') diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php index b043060d..653a4e44 100644 --- a/framework/Web/UI/WebControls/TDataBoundControl.php +++ b/framework/Web/UI/WebControls/TDataBoundControl.php @@ -328,7 +328,12 @@ abstract class TDataBoundControl extends TWebControl $this->setRequiresDataBinding(false); $this->dataBindProperties(); $this->onDataBinding(null); - $data=$this->getData(); + + if(($view=$this->getDataSourceView())!==null) + $data=$view->select($this->getSelectParameters()); + else + $data=null; + if($data instanceof Traversable) { if($this->getAllowPaging()) @@ -359,14 +364,6 @@ abstract class TDataBoundControl extends TWebControl $this->setRequiresDataBinding(true); } - protected function getData() - { - if(($view=$this->getDataSourceView())!==null) - return $view->select($this->getSelectParameters()); - else - return null; - } - protected function getDataSourceView() { if(!$this->_currentViewValid) -- cgit v1.2.3