Hi Adam,
Sorry for my bad description.
public function body(){
$tabbed_browser = &$this->init_module('Utils/TabbedBrowser');
$tabbed_browser->set_tab(_('Tab1'), array($this, 'create_record_browser'));
$tabbed_browser->set_tab(_('Tab2'), array($this, 'create_record_browser'));
$tabbed_browser->set_tab(_('Tab3'), array($this, 'create_record_browser'));
$tabbed_browser->set_tab(_('Tab4'), array($this, 'create_record_browser'));
$tabbed_browser->tag();
$this->display_module($tabbed_browser);
return;
public function create_record_browser () {
print_r('create RB');
$rb = &$this->init_module('Utils/RecordBrowser', 'my_module');
$this->display_module($rb);
return FALSE;
}
I open this modul, there is TB with text and RB. After first switch on any tab it still works.
But when I then switch on another tab, text is printed, but RB disappears. The same happens, if I create different callback functions for every tab.
Now I modify my code:
......
$tabbed_browser->set_tab(_('Tab2'), array($this, 'create_something));
.......
public function create_something () {
print_r('Something');
$t_browser = &$this->init_module('Utils/TabbedBrowser');
$t_browser->set_tab(_('Items'), array($this, NULL));
$t_browser->set_tab(_('Catalog'), array($this, NULL));
$this->display_module($t_browser);
return FALSE;
}
So Tabs 1, 3 and 4 should show RB. On Tab2 is TB now.
If I switching between tabs 1, 3 and 4, RB disappears after the second switch. Then I click on the Tab2. There is printed text and TB. Then I can switch on any Tab, RB is displayed and disappears after second switch...
I have to to do something wrong. But I'm not able to find out what.