I'm using Ext with Ruby on Rails. I have a viewport with a border layout. In the west region is a site navigation tree, and in the center region is a tab panel. My navigation tree listener responds by creating a new tab in the tab panel and loading a url:
Code:
listeners: {
click: function(n) {
var t = tabPanel.findById(n.attributes.text);
if (!t) {
t = tabPanel.add(new Ext.Panel({
id: tabId,
title: "Tab titles goes here",
closable: true
}));
}
tabPanel.setActiveTab(t);
var updater = t.getUpdater();
updater.update({
url: "/ror_controller/" + ror_action,
scripts: true
})
}
}
The javascript in my RoR action template is eval'd, but how do I render an Ext component into my new tab? In other words, if I embed javascript code within my RoR view template that creates Ext components, how do I make those components render to the new tab? For example, how do I display a new panel, or a grid panel, within the newly created tab?
Thanks!