diff options
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TCheckBox.php | 40 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TImageButton.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TTextBox.php | 5 |
3 files changed, 40 insertions, 7 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 diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php index b0fb5a8b..7043fa86 100644 --- a/framework/Web/UI/WebControls/TImageButton.php +++ b/framework/Web/UI/WebControls/TImageButton.php @@ -117,7 +117,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven {
$this->_x=intval($values["{$uid}_x"]);
$this->_y=intval($values["{$uid}_y"]);
- $page=$this->getPage()->registerRequiresRaiseEvent($this);
+ $page=$this->getPage()->setPostBackEventTarget($this);
}
return false;
}
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index 5e57e240..bfd7c029 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -224,15 +224,14 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable 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());
}
$this->onTextChanged(new TEventParameter);
}
-
/**
* Renders the body content of the textbox when it is in MultiLine text mode.
* @param THtmlWriter the writer for rendering
|