Skip to content

Instantly share code, notes, and snippets.

@rkmax
Created April 13, 2011 21:12
Show Gist options
  • Save rkmax/918431 to your computer and use it in GitHub Desktop.
Save rkmax/918431 to your computer and use it in GitHub Desktop.
{
xtype: 'tabpanel',
activeTab: 0,
width: 300,
height: 335,
margins: '{all: 5}',
id: 'campos',
lazyRender: true,
items: [],
listeners: {
'tabchange': function () {
console.log('tabchange');
},
'afterrender': function () {
console.log('afterrender');
var t_store = new genericStore({
storeId: 'tablas_store',
autoLoad: false,
baseParams: {
'class': 'tabla'
},
sortInfo: {
field: 'Nombre',
direction: 'ASC'
}
});
t_store.load(function () {
t_store.each(function (item, index, len) {
Ext.getCmp('campos').add({
xtype: 'panel',
title: item.data.Nombre
});
});
});
}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment