summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TPanel.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TPanel.php')
-rw-r--r--framework/Web/UI/WebControls/TPanel.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/framework/Web/UI/WebControls/TPanel.php b/framework/Web/UI/WebControls/TPanel.php
index 2256420b..2bf1b40d 100644
--- a/framework/Web/UI/WebControls/TPanel.php
+++ b/framework/Web/UI/WebControls/TPanel.php
@@ -229,12 +229,7 @@ class TPanel extends TWebControl
if(($butt=$this->getDefaultButton())!=='')
{
- $buttons = $this->findControlsByID($butt);
- if (count($buttons)>0)
- $button = reset($buttons);
- else
- $button = null;
- if($button===null)
+ if(($button=$this->findControl($butt))===null)
throw new TInvalidDataValueException('panel_defaultbutton_invalid',$butt);
else
$this->getPage()->getClientScript()->registerDefaultButton($this, $button);