I’m writing some test code and would like to show a list in a floating container. The test code is not working. Can anyone have a look to see if there is anything I am missing:
var p = Ext.create('Ext.form.Panel', {
xtype: 'panel',
scrollable: true,
centered: true,
width: 300,
height: 300,
items: [
{
xtype:"container",
layout: {
type: 'vbox'
},
items: [
{
xtype: "list",
itemTpl: '{title},{author}',
flex: 1,
store: {
autoLoad: true,
fields : ['title', 'author'],
proxy: {
type: 'jsonp',
url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
reader: {
type: 'json',
rootProperty: 'responseData.feed.entries'
}
}
}
}
]
}
]
});
Ext.Viewport.add(p);
That’s simply because you are trying to put a list inside a FormPanel.
Try to use a container instead, and, in addition, if you only need to put a list inside it, don’t use a “vbox” layout but a fit one.