From 196141bf72e092c911906d9530fa4ddf53bc3276 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 25 Jan 2006 04:56:19 +0000 Subject: Added TDropDownList validation demos. --- framework/Web/UI/WebControls/TDropDownList.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/WebControls/TDropDownList.php b/framework/Web/UI/WebControls/TDropDownList.php index a3c02c15..14a4dac4 100644 --- a/framework/Web/UI/WebControls/TDropDownList.php +++ b/framework/Web/UI/WebControls/TDropDownList.php @@ -26,7 +26,7 @@ Prado::using('System.Web.UI.WebControls.TListControl'); * @package System.Web.UI.WebControls * @since 3.0 */ -class TDropDownList extends TListControl implements IPostBackDataHandler +class TDropDownList extends TListControl implements IPostBackDataHandler, IValidatable { /** * Adds attributes to renderer. @@ -101,5 +101,15 @@ class TDropDownList extends TListControl implements IPostBackDataHandler { throw new TNotSupportedException('dropdownlist_selectedindices_unsupported'); } + + /** + * Returns the value to be validated. + * This methid is required by IValidatable interface. + * @return mixed the value of the property to be validated. + */ + public function getValidationPropertyValue() + { + return $this->getSelectedValue(); + } } ?> \ No newline at end of file -- cgit v1.2.3