diff options
author | xue <> | 2005-12-04 04:25:45 +0000 |
---|---|---|
committer | xue <> | 2005-12-04 04:25:45 +0000 |
commit | 0dda82c2a13ed09a2520dda9b420e8f90703c67b (patch) | |
tree | 27815328ce64437ff5e34cb163557d365b316abc /framework/Web/UI/WebControls/TCheckBox.php | |
parent | 3ea63072225a473239227facfabde294bb58ed1d (diff) |
Diffstat (limited to 'framework/Web/UI/WebControls/TCheckBox.php')
-rw-r--r-- | framework/Web/UI/WebControls/TCheckBox.php | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index 7b9d4702..ad83556e 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -103,9 +103,9 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl public function raisePostDataChangedEvent()
{
$page=$this->getPage();
- if($this->getAutoPostBack() && !$page->getIsPostBackEventControlRegistered())
+ if($this->getAutoPostBack() && !$page->getPostBackEventTarget())
{
- $page->setAutoPostBackControl($this);
+ $page->setPostBackEventTarget($this);
if($this->getCausesValidation())
$page->validate($this->getValidationGroup());
}
@@ -393,7 +393,41 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl $writer->renderBeginTag('input');
$writer->renderEndTag();
}
- // todo: onprerender???
+
+ protected function onPreRender($param)
+ {
+ parent::onPreRender($param);
+ $this->getPage()->registerRequiresPostBack($this);
+ }
+
+ /*
+protected internal override void OnPreRender(EventArgs e)
+{
+ base.OnPreRender(e);
+ bool flag1 = this.AutoPostBack;
+ if ((this.Page != null) && base.IsEnabled)
+ {
+ this.Page.RegisterRequiresPostBack(this);
+ if (flag1)
+ {
+ this.Page.RegisterPostBackScript();
+ this.Page.RegisterFocusScript();
+ if (this.CausesValidation && (this.Page.GetValidators(this.ValidationGroup).Count > 0))
+ {
+ this.Page.RegisterWebFormsScript();
+ }
+ }
+ }
+ if (!this.SaveCheckedViewState(flag1))
+ {
+ this.ViewState.SetItemDirty("Checked", false);
+ if ((this.Page != null) && base.IsEnabled)
+ {
+ this.Page.RegisterEnabledControl(this);
+ }
+ }
+}
+*/
}
?>
\ No newline at end of file |