diff options
author | carlgmathisen <> | 2008-12-19 20:31:18 +0000 |
---|---|---|
committer | carlgmathisen <> | 2008-12-19 20:31:18 +0000 |
commit | d57cd99f5053c23f237accb92a4553a0506c8f5f (patch) | |
tree | 424b5cbcf82170f41100a0443fcce5645f9b2e45 | |
parent | 98c6f4005ccfb3b91ede65b919300d36935cb61f (diff) |
Issue 64 - Exception on TListControl
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TListControl.php | 6 |
2 files changed, 2 insertions, 5 deletions
@@ -13,6 +13,7 @@ ENH: Issue#72 - Add wildcard support to TUrlMapping (friendly-urls) (Michael) ENH: Issue#77 - TJsonService missing exception messages (Carl) ENH: Issue#29 - Ability to specify position of popup TDatePicker/TActiveDatePicker (Carl) ENH: Issue#75 - TApplication::setRuntimePath() to update uniqueID and cacheFile (Carl) +ENH: Issue#64 - Don't throw exception on wrong value for TListcontrols (Carl) NEW: Issue#51 - Additional template tag (Carl) Version 3.1.3 November 1, 2008 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;
|