Skip to content

Instantly share code, notes, and snippets.

@jaygarcia
Created January 25, 2012 02:14
Show Gist options
  • Save jaygarcia/1674186 to your computer and use it in GitHub Desktop.
Save jaygarcia/1674186 to your computer and use it in GitHub Desktop.
Ext.define('MyApp.MainContainer', {
extend : 'Ext.Container',
requires : [
'MyApp.PersonList',
'MyApp.PersonDetail'
],
config : {
layout : {
type : 'hbox',
align : 'stretch'
},
items : [
{
xtype : 'personlist',
itemId : 'list',
flex : .25,
style : 'border-right: 1px solid #999'
},
{
xtype : 'persondetail',
itemId : 'detail',
flex : 1
}
],
listeners : {
select : {
fn : 'onListSelect',
delegate : '> #list'
}
}
},
onListSelect : function(list, record) {
this.getComponent('detail').loadRecord(record);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment