summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorxue <>2006-12-01 12:28:55 +0000
committerxue <>2006-12-01 12:28:55 +0000
commit17f49a9bc71d88c9b3e2f31a161f3689c136ac16 (patch)
treefc77b9c75927cd56281417843a318e85c39ce729 /framework/Web/UI/WebControls
parent074032e0270ae70eed481a082158dc9554aaa1db (diff)
merge from 3.0 branch till 1531.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TDataBoundControl.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php
index 599bdef2..79175288 100644
--- a/framework/Web/UI/WebControls/TDataBoundControl.php
+++ b/framework/Web/UI/WebControls/TDataBoundControl.php
@@ -218,7 +218,7 @@ abstract class TDataBoundControl extends TWebControl
public function setCurrentPageIndex($value)
{
if(($value=TPropertyValue::ensureInteger($value))<0)
- throw new TInvalidDataValueException('databoundcontrol_currentpageindex_invalid',get_class($this));
+ $value=0;
$this->setViewState('CurrentPageIndex',$value,0);
}
@@ -337,7 +337,7 @@ abstract class TDataBoundControl extends TWebControl
$ds->setDataSource($data);
$this->setViewState('PageCount',$ds->getPageCount());
if($ds->getCurrentPageIndex()>=$ds->getPageCount())
- throw new TInvalidDataValueException('databoundcontrol_currentpageindex_invalid',get_class($this));
+ $ds->setCurrentPageIndex($ds->getPageCount()-1);
$this->performDataBinding($ds);
}
else