From d57cd99f5053c23f237accb92a4553a0506c8f5f Mon Sep 17 00:00:00 2001 From: carlgmathisen <> Date: Fri, 19 Dec 2008 20:31:18 +0000 Subject: Issue 64 - Exception on TListControl --- framework/Web/UI/WebControls/TListControl.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'framework/Web') diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index 84c23f88..55b272c6 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -487,8 +487,6 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer $this->clearSelection(); if($index>=0 && $index<$this->_items->getCount()) $this->_items->itemAt($index)->setSelected(true); - else if($index!==-1) - throw new TInvalidDataValueException('listcontrol_selectedindex_invalid',get_class($this),$index); } $this->_cachedSelectedIndex=$index; if($this->getAdapter() instanceof IListControlAdapter) @@ -601,7 +599,7 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer $item->setSelected(true); } else - throw new TInvalidDataValueException('listcontrol_selectedvalue_invalid',get_class($this),$value); + $this->clearSelection(); } $this->_cachedSelectedValue=$value; if($this->getAdapter() instanceof IListControlAdapter) @@ -643,8 +641,6 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer { if(isset($lookup["$value"])) $lookup["$value"]->setSelected(true); - else - throw new TInvalidDataValueException('listcontrol_selectedvalue_invalid',get_class($this),$value); } } $this->_cachedSelectedValues=$values; -- cgit v1.2.3