From bf52fb00087ceb045f50920e031538fbef9002a1 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 28 Sep 2007 01:31:56 +0000 Subject: enabled unselection. --- framework/Web/UI/WebControls/TDropDownList.php | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'framework') diff --git a/framework/Web/UI/WebControls/TDropDownList.php b/framework/Web/UI/WebControls/TDropDownList.php index 90668b95..3270ad16 100644 --- a/framework/Web/UI/WebControls/TDropDownList.php +++ b/framework/Web/UI/WebControls/TDropDownList.php @@ -106,23 +106,6 @@ class TDropDownList extends TListControl implements IPostBackDataHandler, IValid 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. - */ - public function getSelectedIndex() - { - $index=parent::getSelectedIndex(); - if($index<0 && $this->getHasItems()) - { - $this->setSelectedIndex(0); - return 0; - } - else - return $index; - } - /** * @throws TNotSupportedException if this method is invoked */ -- cgit v1.2.3