From 6228873cf9d6471463d2413e7dfd7447f759baf2 Mon Sep 17 00:00:00 2001 From: "christophe.boulain" <> Date: Wed, 3 Dec 2008 14:22:03 +0000 Subject: Merge from trunk --- framework/Web/UI/WebControls/TListBox.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TListBox.php') diff --git a/framework/Web/UI/WebControls/TListBox.php b/framework/Web/UI/WebControls/TListBox.php index 903dbed8..1b4599fc 100644 --- a/framework/Web/UI/WebControls/TListBox.php +++ b/framework/Web/UI/WebControls/TListBox.php @@ -39,6 +39,7 @@ Prado::using('System.Web.UI.WebControls.TListControl'); class TListBox extends TListControl implements IPostBackDataHandler, IValidatable { private $_dataChanged=false; + private $_isValid=true; /** * Adds attribute name-value pairs to renderer. @@ -220,6 +221,23 @@ class TListBox extends TListControl implements IPostBackDataHandler, IValidatabl { return $this->getSelectedValue(); } + + /** + * Returns true if this control validated successfully. + * Defaults to true. + * @return bool wether this control validated successfully. + */ + public function getIsValid() + { + return $this->_isValid; + } + /** + * @param bool wether this control is valid. + */ + public function setIsValid($value) + { + $this->_isValid=TPropertyValue::ensureBoolean($value); + } } @@ -242,4 +260,3 @@ class TListSelectionMode extends TEnumerable const Multiple='Multiple'; } -?> -- cgit v1.2.3