summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TDropDownList.php
diff options
context:
space:
mode:
authorxue <>2007-04-09 03:32:50 +0000
committerxue <>2007-04-09 03:32:50 +0000
commit3e1e120dbfbde806bcc0331479d28ce2a0bc2dbf (patch)
tree99124fe4c5c337a55dc22bc22b07b4fdb9a3a609 /framework/Web/UI/WebControls/TDropDownList.php
parentd43420201b1ed45574886e4a94f3f904bd4ea517 (diff)
Added getDataChanged() to IPostBackDataHandler
Diffstat (limited to 'framework/Web/UI/WebControls/TDropDownList.php')
-rw-r--r--framework/Web/UI/WebControls/TDropDownList.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TDropDownList.php b/framework/Web/UI/WebControls/TDropDownList.php
index 5bcf0f35..90668b95 100644
--- a/framework/Web/UI/WebControls/TDropDownList.php
+++ b/framework/Web/UI/WebControls/TDropDownList.php
@@ -35,6 +35,8 @@ Prado::using('System.Web.UI.WebControls.TListControl');
*/
class TDropDownList extends TListControl implements IPostBackDataHandler, IValidatable
{
+ private $_dataChanged=false;
+
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
@@ -74,7 +76,7 @@ class TDropDownList extends TListControl implements IPostBackDataHandler, IValid
if($this->getSelectedIndex()!==$index)
{
$this->setSelectedIndex($index);
- return true;
+ return $this->_dataChanged=true;
}
}
return false;
@@ -95,6 +97,16 @@ class TDropDownList extends TListControl implements IPostBackDataHandler, IValid
}
/**
+ * 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;
+ }
+
+ /**
* @return integer the index (zero-based) of the item being selected.
* If none is selected, the return value is 0 meaning the first item is selected.
* If there is no items, it returns -1.