summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorxue <>2006-01-21 03:57:16 +0000
committerxue <>2006-01-21 03:57:16 +0000
commitbaf2eb12bc99905ad18fadaa4a542a0d109f9245 (patch)
treecb02339aabb9e11e487108a85668fbf242c21326 /framework/Web/UI/WebControls
parent039ef5bb2acd9cde5073e4d20459f9d088f0892e (diff)
TTextBox demo completed. Fixed a few issues related with AutoPostBack=true.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TRequiredFieldValidator.php2
-rw-r--r--framework/Web/UI/WebControls/TTextBox.php9
2 files changed, 3 insertions, 8 deletions
diff --git a/framework/Web/UI/WebControls/TRequiredFieldValidator.php b/framework/Web/UI/WebControls/TRequiredFieldValidator.php
index 2d1dd612..df6c2abf 100644
--- a/framework/Web/UI/WebControls/TRequiredFieldValidator.php
+++ b/framework/Web/UI/WebControls/TRequiredFieldValidator.php
@@ -36,7 +36,7 @@ class TRequiredFieldValidator extends TBaseValidator
*/
public function getInitialValue()
{
- $this->getViewState('InitialValue','');
+ return $this->getViewState('InitialValue','');
}
/**
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php
index 111fec1e..276982ac 100644
--- a/framework/Web/UI/WebControls/TTextBox.php
+++ b/framework/Web/UI/WebControls/TTextBox.php
@@ -232,13 +232,8 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable
*/
public function raisePostDataChangedEvent()
{
- $page=$this->getPage();
- if($this->getAutoPostBack() && !$page->getPostBackEventTarget())
- {
- $page->setPostBackEventTarget($this);
- if($this->getCausesValidation())
- $page->validate($this->getValidationGroup());
- }
+ if($this->getAutoPostBack() && $this->getCausesValidation())
+ $this->getPage()->validate($this->getValidationGroup());
$this->onTextChanged(null);
}