HTMLTabs Bug and Solution

Hi my friends, Today I use the DHTML Tabs on , and I watched that have a bug in ob2.3, If I refresh the page the tab would be stay with the current form(s) and the current tab but it doesnt. This is because there are some lines that overwrite other process.

 ui/BizView.php

BizView::_render

//Add: Next 5 lines was added for get the initial style from a form and after set it in bizview --jmmz
         /*$style=($formobj->m_Style)?Expression::EvaluateExpression($formobj->m_Style,$formobj):'';
         $htmlStyle = ""; //jmmz
         if((!empty($style))&&(!is_null($style))){ //jmmz
             $htmlStyle = "style='{$style}'"; //jmmz
         } //jmmz*/
         //Modification: html attribute added to set the initial style for a form --jmmz

Be sure that  the lines before be commented.

Hi, I have downloaded the ob

Hi, I have downloaded the ob 2.4 and the bug is there still, no solution for that?
Z++ - Use Linux!!!

  This is because we have

 

This is because we have the function

 

$htmlStyle =  $this->GetHTMLStyle($formobj);

 

And this function get the styles correctly but the variable $htmlStyle is overwrited in the lines:

 

$style=($formobj->m_Style)?Expression::EvaluateExpression($formobj->m_Style,$formobj):'';

 

         $htmlStyle = ""; //jmmz

 

         if((!empty($style))&&(!is_null($style))){ //jmmz

 

             $htmlStyle = "style='{$style}'"; //jmmz

 

         } //jmmz

 

And this is because in the GetHTMLStyle we get the style from the session but, lines after we get the value on Style attribute in BizForm (xml) file.

 

If you want see the error follow the next steps:

 

1.- Do click in other tab that not be the first.

2.- Press F5 (refresh the page)

 

Then you can see that the form doesn't correspond in the tab.

 

Z++ - Use Linux!!!

I took a look at the code

I took a look at the code and can see no reason why we would keep the lines you commented out.  The prevous function on line 334 seems to do much the same thing as the snippet giving you trouble.

 

I've seen this issue in my own work and will investigate and post the change to the 2.3 and possibly the 2.4 repo.