# HG changeset patch # User Torsten Irländer # Date 1367239516 -7200 # Node ID b8e56e880f022c5556fdc6de55ec8434ee3fbe8f # Parent ac736eea9b30ef89385bc98e8c19b29f96451e68 Added a first example view (userlisting) from the EXJS Tutorial. Need to be adapted. diff -r ac736eea9b30 -r b8e56e880f02 app.js --- a/app.js Mon Apr 29 14:21:11 2013 +0200 +++ b/app.js Mon Apr 29 14:45:16 2013 +0200 @@ -8,9 +8,8 @@ layout: 'fit', items: [ { - xtype: 'panel', - title: 'Probenauswahlmaske', - html: 'Probenliste wird hier angezeigt.' + xtype: 'probenlist', + title: 'Probenauswahlmaske' } ] }); diff -r ac736eea9b30 -r b8e56e880f02 app/controller/Proben.js --- a/app/controller/Proben.js Mon Apr 29 14:21:11 2013 +0200 +++ b/app/controller/Proben.js Mon Apr 29 14:45:16 2013 +0200 @@ -1,5 +1,8 @@ Ext.define('Lada.controller.Proben', { extend: 'Ext.app.Controller', + views: [ + 'proben.List' + ], init: function() { console.log('Initialising the Proben controller'); this.control({ diff -r ac736eea9b30 -r b8e56e880f02 app/view/proben/List.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/proben/List.js Mon Apr 29 14:45:16 2013 +0200 @@ -0,0 +1,23 @@ +Ext.define('Lada.view.proben.List' ,{ + extend: 'Ext.grid.Panel', + alias: 'widget.probenlist', + + title: 'Alle Proben', + + initComponent: function() { + this.store = { + fields: ['name', 'email'], + data : [ + {name: 'Ed', email: 'ed@sencha.com'}, + {name: 'Tommy', email: 'tommy@sencha.com'} + ] + }; + + this.columns = [ + {header: 'Name', dataIndex: 'name', flex: 1}, + {header: 'Email', dataIndex: 'email', flex: 1} + ]; + + this.callParent(arguments); + } +});