diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TPanel.php')
-rw-r--r-- | framework/Web/UI/WebControls/TPanel.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TPanel.php b/framework/Web/UI/WebControls/TPanel.php index c7464c7c..5065aa61 100644 --- a/framework/Web/UI/WebControls/TPanel.php +++ b/framework/Web/UI/WebControls/TPanel.php @@ -72,8 +72,10 @@ class TPanel extends TWebControl throw new TInvalidDataValueException('panel_defaultbutton_invalid',$butt);
else
{
- $onkeypress=$this->getPage()->getClientScript()->registerDefaultButtonScript($button);
- $writer->addAttribute('onkeypress',$onkeypress);
+ $scripts = $this->getPage()->getClientScript();
+ $js = $scripts->registerDefaultButtonScript($this,$button);
+ $scripts->registerEndScript($this->ClientID.'defaultButton', $js);
+ $writer->addAttribute('id',$this->getClientID());
}
}
}
|