summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/UI/WebControls/TListControl.php6
2 files changed, 2 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index 261dbf7f..f148d6e7 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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;