PDA

View Full Version : Trouble implementing with Ext.Application



ickyfoot
4 Feb 2011, 2:00 PM
Hello there,
I'm posting because I'm trying to build my second application using Ext.Application instead of Ext.setup. Unfortunately, I'm having some trouble understanding how the parts interact using this new structure. Here are the two versions. Ext.setup works as I'd expect. I pull in the data, posted it to the viewport, and can scroll vertically. I can't replicate all of this with Ext.Application. The data comes in and displays in the viewport, but I can't get it to scroll. I also can't seem to use any layout types other than 'auto' without losing the content in the viewport. Can anyone shed some light on why my configuration of Ext.Application is less flexible than Ext.setup? Code below, store/model/view omitted for brevity.

Ext.setup:


var nwTb = new Ext.Toolbar({
dock: 'top',
title: 'Test',
});

var crsInfPnl = new Ext.Panel({
layout: 'fit',
scroll: 'vertical',
fullscreen: true,
items: [crsDtVw],
});

var portal = new Ext.Panel({
dockedItems: [nwTb],
layout: 'card',
fullscreen: true,
items: [crsInfPnl]
});

Ext.setup({
onReady: function() {
this.viewport = new Ext.Container({
fullscreen: true,
layout: 'fit',
items: [portal]
});
}
});

And, Ext.Application:


var nwTb = new Ext.Toolbar({
dock: 'top',
title: 'Test',
});

var crsInfPnl = new Ext.Panel({
layout: 'auto',
fullscreen: true,
items: [crsDtVw],
});

var portal = new Ext.Panel({
dockedItems: [nwTb],
layout: 'auto',
fullscreen: true,
items: [crsInfPnl]
});

new Ext.Application({
name: 'crsDescApp',
launch: function() {
this.viewport = new Ext.Panel({
fullscreen: true,
layout: 'auto',
items: [portal]
});
}
});


Thanks in advance!
-Eric

ickyfoot
7 Feb 2011, 6:47 AM
Good Morning,
Just wanted to bring this back up since I posted so late in the day on Friday. Anyone have any insight?
Thanks,
-Eric