Skip to content

Instantly share code, notes, and snippets.

@moduscreate
Created January 25, 2012 01:37
Show Gist options
  • Save moduscreate/1674072 to your computer and use it in GitHub Desktop.
Save moduscreate/1674072 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'
}
},
initialize : function() {
this.add([
{
xtype : 'personlist',
itemId : 'list',
flex : .25,
height : 300,
style : 'border-right: 1px solid #999',
listeners : {
scope : this,
select : this.onListSelect
}
},
{
xtype : 'persondetail',
itemId : 'detail',
flex : 1
}
]);
this.callParent();
},
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