view app/controller/Proben.js @ 14:c0b2faa47ee5

Load data from data/proben.json
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 30 Apr 2013 15:06:43 +0200
parents a8efc4b96888
children 9e1a40312bbe
line wrap: on
line source
Ext.define('Lada.controller.Proben', {
    extend: 'Ext.app.Controller',
    views: [
        'proben.List'
    ],
    stores: [
        'Proben'
    ],
    models: [
        'Probe'
    ],
    init: function() {
        console.log('Initialising the Proben controller');
        this.control({
            // CSS like selector to select element in the viewport. See
            // ComponentQuery documentation for more details.
            'viewport > probenlist': {
                // Map the "render" event to the given function.
                render: this.onPanelRendered,
                // Map Doubleclick on rows of the probenlist.
                itemdblclick: this.editProbe
            }
        });
    },
    onPanelRendered: function() {
        console.log('The panel was rendered');
    },
    editProbe: function(grid, record) {
        console.log('Double click on ' + record.get('name'));
    }
});

http://lada.wald.intevation.org