Tabbar in one region and it's content in another region

Hi,

1). I want to create a UI, where UI is divided into 2 region. In 1 region tabbar is loaded from server asynchronously, and in another region tabbar content is loaded on demand. Can this be done using tabbar readily available commands or i will have to create this UI through illusion to user.

2). Can i get the handle of iframe that tab creates and can i detach it from tab and attach it to other layout region?

Thanks,
Ashwani.

Hi,

the problem isn’t clear enough.

Both tabbar and layout allow to load content into their items using Ajax or into iframes.

The objects those are attached to the items (attachObject method) and be detached and then attached to other items.

layout.cells(cell_id).detachObject(false); attaches the object to document body. Then you may attach this object to another cell:

layout.cells(cell_id).attachObject(element_id);

I have a layout with 2 regions (2E). 1 region(cell(“a”)) will hold tabbar and 2nd region(cell(“b”)) will hold tabbar content. Is this possible?

Thanks,
Ashwani.

It’s impossible to place the content outside the tabbar. However, you may create the tabbar without any content.

tabbar.enableContentZone(false);

the cell “b” you may attach html container and change attached containers using onSelect tab event:

[code]/object with ids of containers those correspond tabs/
var content = {“tab1”:“content1”,“tab2”:“content2”};

tabbar.attachEvent(“onSelect”,function(id){
layout.cells(“b”).detachObject(false);
layout.cells(“b”).attachObject(content.id);
return true
})[/code]

Thanks.

Few more questions:

1). Can i bring tabbar into the layout cell region, as when i attach tabbar to the layout cell region it is available at the top.

2). What is the way to make layout cell region height equal to tabbar height?.

If questions are not clear, then simple summary is, i want to put tabbar inside the layout cell region, not above it.

Can i bring tabbar into the layout cell region, as when i attach tabbar to the layout cell region it is available at the top.

Possibly you meant that the header of layout cell hidden. You may call showHeader() method to show the header after the tabbar has been attached:

dhxTabbar = dhxLayout.cells(“a”).attachTabbar();
dhxLayout.cells(“a”).showHeader();

What is the way to make layout cell region height equal to tabbar height?.

There isn’t such a built-in method. But you know the tabbar height. You may use setHeight() method to set cell height:
dhxLayout.cells(“a”).setHeight(200);