summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2006-01-11 02:17:12 +0000
committerxue <>2006-01-11 02:17:12 +0000
commitdeb44d4ca9cb18865c90de0878cbc27aa4ee6c56 (patch)
tree1c177f456564c34b999737953c7a3b01d9b0519a /framework/Web/UI
parent384a8f108e3de0e2475d4267732b0f3ffabb7541 (diff)
TRepeater nearly completed (test pending)
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/TTemplateControl.php4
-rw-r--r--framework/Web/UI/TTemplateManager.php3
-rw-r--r--framework/Web/UI/WebControls/TDataBoundControl.php7
-rw-r--r--framework/Web/UI/WebControls/TDataSourceControl.php9
-rw-r--r--framework/Web/UI/WebControls/TDataSourceView.php2
5 files changed, 17 insertions, 8 deletions
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php
index 93951718..72731ecd 100644
--- a/framework/Web/UI/TTemplateControl.php
+++ b/framework/Web/UI/TTemplateControl.php
@@ -72,7 +72,7 @@ class TTemplateControl extends TControl implements INamingContainer
* @param boolean whether to attempt loading template if it is not loaded yet
* @return ITemplate|null the parsed template, null if none
*/
- protected function getTemplate($load=false)
+ public function getTemplate($load=false)
{
if($this->_localTemplate===null)
{
@@ -90,7 +90,7 @@ class TTemplateControl extends TControl implements INamingContainer
* This method should only be used by framework and control developers.
* @param ITemplate the parsed template
*/
- protected function setTemplate($value)
+ public function setTemplate($value)
{
$this->_localTemplate=$value;
}
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 6bf9bc02..bd838db2 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -607,7 +607,8 @@ class TTemplate extends TComponent implements ITemplate
if($matchStart>$textStart && $container>=0)
{
$value=substr($input,$textStart,$matchStart-$textStart);
- $tpl[$container][2][$prop]=$this->parseAttribute($value);
+ //$tpl[$container][2][$prop]=$this->parseAttribute($value);
+ $tpl[$container][2][$prop]=$value;
$textStart=$matchEnd+1;
}
$expectPropEnd=false;
diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php
index 399013a2..d02412e5 100644
--- a/framework/Web/UI/WebControls/TDataBoundControl.php
+++ b/framework/Web/UI/WebControls/TDataBoundControl.php
@@ -10,6 +10,9 @@
* @package System.Web.UI.WebControls
*/
+Prado::using('System.Web.UI.WebControls.TDataSourceControl');
+Prado::using('System.Web.UI.WebControls.TDataSourceView');
+
/**
* TDataBoundControl class.
*
@@ -35,6 +38,8 @@ abstract class TDataBoundControl extends TWebControl
private $_currentDataSource=null;
private $_currentViewValid=false;
private $_currentDataSourceValid=false;
+ private $_currentViewIsFromDataSourceID=false;
+ private $_parameters=null;
/**
* @return Traversable data source object, defaults to null.
@@ -317,7 +322,7 @@ abstract class TDataBoundControl extends TWebControl
return $list;
}
else if(is_array($value))
- $value=new TList($value);
+ return new TList($value);
else if(($value instanceof Traversable) || $value===null)
return $value;
else
diff --git a/framework/Web/UI/WebControls/TDataSourceControl.php b/framework/Web/UI/WebControls/TDataSourceControl.php
index f8944dbb..eaf39199 100644
--- a/framework/Web/UI/WebControls/TDataSourceControl.php
+++ b/framework/Web/UI/WebControls/TDataSourceControl.php
@@ -35,14 +35,17 @@ interface IDataSource
*/
abstract class TDataSourceControl extends TControl implements IDataSource
{
- public function getView($viewName);
+ public function getView($viewName)
+ {
+ return null;
+ }
public function getViewNames()
{
return array();
}
- protected function onDataSourceChanged($param)
+ public function onDataSourceChanged($param)
{
$this->raiseEvent('DataSourceChanged',$this,$param);
}
@@ -72,7 +75,7 @@ abstract class TDataSourceControl extends TControl implements IDataSource
throw new TNotSupportedException('datasourcecontrol_skinid_unsupported');
}
- public function getVisible()
+ public function getVisible($checkParents=true)
{
return false;
}
diff --git a/framework/Web/UI/WebControls/TDataSourceView.php b/framework/Web/UI/WebControls/TDataSourceView.php
index a41555d1..ceed981f 100644
--- a/framework/Web/UI/WebControls/TDataSourceView.php
+++ b/framework/Web/UI/WebControls/TDataSourceView.php
@@ -96,7 +96,7 @@ abstract class TDataSourceView extends TComponent
* @param ???
* @return Traversable
*/
- public function select($parameters);
+ abstract public function select($parameters);
/**
* Inserts a DB record.