From 357ee6f0b72cd1657b01d8ebc5854300e5fadab4 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Mon, 4 Jun 2012 08:47:39 +0000 Subject: After r3159 TTabPanel was not keeping the active TabView upon post back: fixed --- framework/Web/UI/WebControls/TTabPanel.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/WebControls/TTabPanel.php') diff --git a/framework/Web/UI/WebControls/TTabPanel.php b/framework/Web/UI/WebControls/TTabPanel.php index a79835ed..092e7931 100644 --- a/framework/Web/UI/WebControls/TTabPanel.php +++ b/framework/Web/UI/WebControls/TTabPanel.php @@ -394,6 +394,10 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler parent::onPreRender($param); $this->getActiveView(); // determine the active view $this->registerStyleSheet(); + + $page=$this->getPage(); + $page->registerRequiresPostData($this); + $page->registerRequiresPostData($this->getClientID()."_1"); } /** @@ -426,8 +430,7 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler $id=$this->getClientID(); $options=TJavaScript::encode($this->getClientOptions()); $className=$this->getClientClassName(); - $page=$this->getPage(); - $cs=$page->getClientScript(); + $cs=$this->getPage()->getClientScript(); $cs->registerPradoScript('tabpanel'); $code="new $className($options);"; $cs->registerEndScript("prado:$id", $code); @@ -436,8 +439,6 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler if(!$this->getViews()->itemAt($index)->Visible) $index=0; $cs->registerHiddenField($id.'_1', $index); - $page->registerRequiresPostData($this); - $page->registerRequiresPostData($id."_1"); } /** -- cgit v1.2.3