diff options
author | wei <> | 2006-05-14 00:30:53 +0000 |
---|---|---|
committer | wei <> | 2006-05-14 00:30:53 +0000 |
commit | ae43fa72cdae13bace16a5b8250170e472bb2b87 (patch) | |
tree | 6efea16ae0773f5c739bff2cf643f54ba499e5c0 /framework/Web/UI/ActiveControls/TActiveLabel.php | |
parent | ddc3ea15bbfd0235fe90f3b2211bf4cc605e25d6 (diff) |
refactor active controls.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveLabel.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActiveLabel.php | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveLabel.php b/framework/Web/UI/ActiveControls/TActiveLabel.php index 13a88b4f..fd2d49b8 100644 --- a/framework/Web/UI/ActiveControls/TActiveLabel.php +++ b/framework/Web/UI/ActiveControls/TActiveLabel.php @@ -37,32 +37,11 @@ class TActiveLabel extends TLabel $this->setAdapter(new TActiveControlAdapter($this));
}
- /**
- * @param boolean true to allow fine grain callback updates.
- */
- public function setAllowCallbackUpdate($value)
- {
- $this->setViewState('CallbackUpdate', TPropertyValue::ensureBoolean($value), true);
- }
-
- /**
- * @return true to allow fine grain callback updates.
- */
- public function getAllowCallbackUpdate()
+ public function getActiveControl()
{
- return $this->getViewState('CallbackUpdate', true);
+ return $this->getAdapter()->getActiveControl();
}
-
- /**
- * @return true if can update changes on the client-side during callback.
- */
- protected function canUpdateClientSide()
- {
- return $this->getIsInitialized()
- && $this->getPage()->getIsCallback()
- && $this->getAllowCallbackUpdate();
- }
-
+
/**
* On callback response, the inner HTMl of the label is updated.
* @param string the text value of the label
@@ -70,7 +49,7 @@ class TActiveLabel extends TLabel public function setText($value)
{
parent::setText($value);
- if($this->canUpdateClientSide())
+ if($this->getActiveControl()->canUpdateClientSide())
$this->getPage()->getCallbackClient()->update($this, $value);
}
@@ -83,7 +62,7 @@ class TActiveLabel extends TLabel public function setForControl($value)
{
parent::setForControl($value);
- if($this->canUpdateClientSide())
+ if($this->getActiveControl()->canUpdateClientSide())
{
$id=$this->findControl($value)->getClientID();
$this->getPage()->getCallbackClient()->setAttribute($this, 'for', $id);
|