diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TPanel.php')
-rw-r--r-- | framework/Web/UI/WebControls/TPanel.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/framework/Web/UI/WebControls/TPanel.php b/framework/Web/UI/WebControls/TPanel.php index cf20a864..2bf1b40d 100644 --- a/framework/Web/UI/WebControls/TPanel.php +++ b/framework/Web/UI/WebControls/TPanel.php @@ -4,9 +4,8 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -35,7 +34,6 @@ Prado::using('System.Web.UI.WebControls.TPanelStyle'); * by setting the {@link setDefaultButton DefaultButton} property. * * @author Qiang Xue <qiang.xue@gmail.com> - * @version $Id: TPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -231,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); |