summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php6
-rw-r--r--framework/Web/UI/WebControls/TListControl.php2
2 files changed, 7 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index d82150ca..1f1d0b1b 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -105,6 +105,12 @@ abstract class TBaseValidator extends TLabel implements IValidator
$this->getPage()->getValidators()->add($this);
}
+ protected function onUnload($param)
+ {
+ $this->getPage()->getValidators()->remove($this);
+ parent::onUnload($param);
+ }
+
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php
index 265c320b..e1384d54 100644
--- a/framework/Web/UI/WebControls/TListControl.php
+++ b/framework/Web/UI/WebControls/TListControl.php
@@ -149,6 +149,7 @@ abstract class TListControl extends TDataBoundControl
*/
protected function performDataBinding($data)
{
+ $items=$this->getItems();
if(!$this->getAppendDataBoundItems())
$items->clear();
if($data instanceof Traversable)
@@ -160,7 +161,6 @@ abstract class TListControl extends TDataBoundControl
if($valueField==='')
$valueField=1;
$textFormat=$this->getDataTextFormatString();
- $items=$this->getItems();
foreach($data as $object)
{
$item=new TListItem;