PDA

View Full Version : Url is not loaded in Ext.Window



nitija
25 Nov 2012, 11:07 PM
I am trying to load "url" in a Ext.window.Window using below lines of code.
<b>
Ext.define('Lancet.engine.asset.population.NewPopulation',
{
extend: 'Ext.button.Button',
alias: 'NewPopulation',
itemId: 'btnNewPopulation',
iconCls: 'new16',
disabled: false,
listeners: {
click: function () {
var winObj = new Ext.create('Ext.window.Window', {
width: 500,
height: 300,
title: "Add Populations",
maximizable: false,
modal: true,
loader: {
url: "http://localhost/Lancet.Engine.Web/populations/EditOrnew",
loadMask: false,
autoLoad: true, // important
renderer: 'component', // this is also the default option, other options are data | component
autoRender: true,
rendered: true
}
}).show();
}
}
});
</b>
But Url is not loaded and only window is displayed. Some one pls. help or advice.

ajaxvador
26 Nov 2012, 1:38 PM
....
items: [Ext.create('Ext.ux.IFrame',{
src:'http://www.google.com',
title:'google'
})]
...

nitija
26 Nov 2012, 8:06 PM
Hi ,

Thanks for answer. But this is how i got it working yesterday . :)

Ext.define('Lancet.engine.asset.population.NewPopulation',
{
extend: 'Ext.button.Button',
alias: 'NewPopulation',
itemId: 'btnNewPopulation',
iconCls: 'new16',
disabled: false,
listeners: {
click: function () {
var populationGrid = Ext.create('Lancet.asset.populations.Grid'); // thiis is my custom control which i m opening in window.
addpopWindow = new Ext.widget('window', {
title: 'Add Populations',
closeAction: 'destroy',
width: 650,
draggable: false,
height: 400,
closable: true,
layout: 'fit',
modal: false,
items: [populationGrid] , buttons: [{
text: 'Close',
handler: function () {
addpopWindow.destroy();
}
}]}).show();




}
}
});