thanks for your response.
I've trying this but no result...
Code:
Ext.define('CesigestMobile.view.MenuPrincipal', {
extend: 'Ext.NestedList',
alias : 'widget.CesigestMobile_view_MenuPrincipal',
constructor: function(config) {
config = config || {};
var dataMenu = {
text: 'Maestros',
items: [{
text: 'Clientes',
items: [{
text: 'Overview',
id: 'overview',
leaf: true
},{
text: 'Leaf1',
id: 'Leaf1',
leaf: true
},{
text: 'Leaf2',
id: 'Leaf2',
leaf: true
}]
}]
};
var storeMenu = Ext.create('Ext.data.TreeStore', {
model: 'ListItem',
defaultRootProperty: 'items',
root: dataMenu
});
// Aplicar configuraciones por defecto
Ext.apply(this, config,
{
title: 'Cesigest - Menu',
cardSwitchAnimation: 'slide',
displayField: 'text',
useTitleAsBackText: true,
store: storeMenu,
listeners: {
leafitemtap: function(list, index, item, e) {
var me = list.getParent(),
store = list.getStore(),
record = store.getAt(index),
detailCard = me.getDetailCard();
alert("hoja clicada");
}
}
});
this.callParent(arguments);
},
// Inicializar el componente
initialize: function() {
this.callParent();
}
});
Code:
function arrancamos() {
Ext.setup({
onReady: function() {
Ext.define('CesigestMobile.App', {
extend: 'Ext.app.Application',
name: 'aplicacion',
appFolder: 'app',
autoCreateViewport: false,
// Metodo para lanzar la aplicacion.
launch: function() {
// Mostrar Menu principal
this.contenedorTitulo = Ext.create('Ext.Panel', {
title: 'Cesigest Mobile - Menu'
});
this.menuPrincipal = Ext.create('CesigestMobile.view.MenuPrincipal');
this.contenedorPrograma = Ext.create('Ext.Panel', {
layout: 'fit',
flex: 1,
items: [ this.menuPrincipal ]
});
this.contenedorPrincipal = Ext.create('Ext.Container', {
fullscreen: true,
layout: 'vbox',
items: [
this.contenedorTitulo,
this.contenedorPrograma
]
});
Ext.Viewport.add( this.contenedorPrincipal );
}
});
// Lanzar aplicacion principal
var aplicacion = new CesigestMobile.App();
}
});
};
The result is something like this screen capture...
Captura.JPGno
nothing written inside the nestedlist control.