BasicDialog autoTabs with dynamic content

I want to create a BasicDialog that gets content via the dialog.body's UpdateManager using a remote URL. The BasicDialog is created off a new empty genereted div id. (autoCreate)

The remote content has divs for tabs but the problem is that the BasicDialog seems to be trying to build the tabs only in the constructor so as a result the tabs are not created when I fetch dialog contents remotely.

I tried building the tabs myself by code in the UpdateManager's callback silimar to the yui example

however I notice that the height of each tab is only that of the content it holds and not the entire height of the dialog. Adding a 'height' style of 100% on each tab results in vertical scrollbars appearing.

Has anyone created tabs in an autoCreated dialog which gets content remotely via the dialog.body's UpdateManager?

I removed the tab initialization from the dialog's constructor and created an "initTabs()" method. initTabs() reuses the existing tabs component or creates a new one if one doesn't already exist. It removes any existing tabs and reads for new ones.

It will have a problem if you overwrite the dialogs body (and the tab dom elements). So the solution may be to:

dialog.getTabs().bodyEl.load({url:...});
dialog.initTabs();

Give it a try and let me know if it works. What you load goes directly into the tabs body element, so it should only be ydlg-tab elements.