diff options
author | wei <> | 2006-09-02 04:02:56 +0000 |
---|---|---|
committer | wei <> | 2006-09-02 04:02:56 +0000 |
commit | 32feb309dc59ca50757431d627db7437c0e29073 (patch) | |
tree | b31ef25e9e33a1a3cd63051fa8bdd39deab717cc /framework/Web/UI/TPage.php | |
parent | 815c7462bbc4848939aa53cf375a0269d51b81fa (diff) |
Fixed #211
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r-- | framework/Web/UI/TPage.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 8c01a501..f3fe7fc9 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -676,6 +676,14 @@ class TPage extends TTemplateControl {
if($beforeLoad)
$this->_restPostData=new TMap;
+ //change the post back target
+ if(($target=$postData[self::FIELD_POSTBACK_TARGET])!==null
+ && ($control=$this->findControl($target))
+ && ($control instanceof IPostBackEventHandler))
+ {
+ $this->_postData->add(self::FIELD_POSTBACK_TARGET,$target);
+ }
+
foreach($postData as $key=>$value)
{
if($this->isSystemPostField($key))
@@ -687,13 +695,17 @@ class TPage extends TTemplateControl if($control->loadPostData($key,$postData))
$this->_controlsPostDataChanged[]=$control;
}
- else if($control instanceof IPostBackEventHandler)
+ else if($control instanceof IPostBackEventHandler &&
+ empty($this->_postData[self::FIELD_POSTBACK_TARGET]))
+ {
$this->_postData->add(self::FIELD_POSTBACK_TARGET,$key); // not calling setPostBackEventTarget() because the control may be removed later
+ }
unset($this->_controlsRequiringPostData[$key]);
}
else if($beforeLoad)
$this->_restPostData->add($key,$value);
}
+
foreach($this->_controlsRequiringPostData as $key=>$value)
{
if($control=$this->findControl($key))
|