summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TTextBox.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TTextBox.php')
-rw-r--r--framework/Web/UI/WebControls/TTextBox.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php
index 3517c73a..1fd54191 100644
--- a/framework/Web/UI/WebControls/TTextBox.php
+++ b/framework/Web/UI/WebControls/TTextBox.php
@@ -66,6 +66,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable
* @var string safe textbox content with javascript stripped off
*/
private $_safeText;
+ private $_dataChanged=false;
/**
* @return string tag name of the textbox
@@ -216,13 +217,23 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable
if(!$this->getReadOnly() && $this->getText()!==$value)
{
$this->setText($value);
- return true;
+ return $this->_dataChanged=true;
}
else
return false;
}
/**
+ * Returns a value indicating whether postback has caused the control data change.
+ * This method is required by the IPostBackDataHandler interface.
+ * @return boolean whether postback has caused the control data change. False if the page is not in postback mode.
+ */
+ public function getDataChanged()
+ {
+ return $this->_dataChanged;
+ }
+
+ /**
* Returns the value to be validated.
* This methid is required by IValidatable interface.
* @return mixed the value of the property to be validated.