Aug 07, 2014, 8:59 PM
Panel loader not creating iframe element for the view
I am using mvc 4 and ext.net 2.5. I am dynamically adding a tab and loading via a view from the controller. However, the view must be displayed in an iframe. When I do not add my own render function - the view does not render to the correct panel. When I add the renderer - it appears to create the container correctly but does not display the content because it is not in an iframe. Here is the addTab method:
var tp = Ext.getCmp('MainTabs');
var tab = tp.add(new Ext.Panel({
title: config.title,
hideMode: 'display',
loader: {
url: config.url,
renderer: function (loader, response, active) {
var text = response.responseText;
loader.getTarget().update(response.responseText);
return true;
},
loadMask: true,
autoLoad: true,
scripts: true,
mode: 'iframe'
},
listeners: {
activate: activateFunc,
beforeclose: closeFunc
},
layout: 'fit',
closable: true
}));
config.url - is a route to the controller which is working. Ex. /Home/Index