diff options
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/TControl.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDataBoundControl.php | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 7e49e7ce..a0242d54 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -1234,8 +1234,6 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable {
if($this->_stage<self::CS_LOADED)
{
- if(($context=$this->getTemplateControl())===null)
- $context=$this;
if(isset($this->_rf[self::RF_ADAPTER]))
$this->_rf[self::RF_ADAPTER]->onLoad(null);
else
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
|