changeset 548:d47ee7439f44

Added new js files.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 06 Mar 2015 12:43:52 +0100
parents f172b35a3b92
children 3aa74630d403
files app.js app/controller/Filter.js app/controller/FilterResult.js app/controller/OrtGrid.js app/controller/ProbeForm.js app/model/Datenbasis.js app/model/Location.js app/model/MKommentar.js app/model/Messeinheit.js app/model/Messgroesse.js app/model/Messmethode.js app/model/Messstelle.js app/model/Messung.js app/model/Messwert.js app/model/Netzbetreiber.js app/model/Ort.js app/model/PKommentar.js app/model/Pflichtmessgroesse.js app/model/Probe.js app/model/ProbeList.js app/model/Probenart.js app/model/Probenzusatz.js app/model/Query.js app/model/Staat.js app/model/Umwelt.js app/model/Verwaltungseinheit.js app/model/Zusatzwert.js app/override/Table.js app/store/Datenbasis.js app/store/Locations.js app/store/MKommentare.js app/store/Messeinheiten.js app/store/Messgroessen.js app/store/Messmethoden.js app/store/Messstellen.js app/store/Messungen.js app/store/Messwerte.js app/store/Netzbetreiber.js app/store/Orte.js app/store/PKommentare.js app/store/Pflichtmessgroessen.js app/store/Proben.js app/store/ProbenList.js app/store/Probenarten.js app/store/Probenzusaetze.js app/store/Probenzusatzwerte.js app/store/Queries.js app/store/Staaten.js app/store/Status.js app/store/Umwelt.js app/store/Verwaltungseinheiten.js app/store/Zusatzwerte.js app/view/FilterPanel.js app/view/Viewport.js app/view/form/Probe.js app/view/grid/FilterResult.js app/view/grid/Ort.js app/view/grid/PKommentar.js app/view/grid/Probenzusatzwert.js app/view/widget/Betriebsart.js app/view/widget/Datenbasis.js app/view/widget/Location.js app/view/widget/Messeinheit.js app/view/widget/Messgroesse.js app/view/widget/Messmethode.js app/view/widget/Messstelle.js app/view/widget/Netzbetreiber.js app/view/widget/Nwg.js app/view/widget/Probenart.js app/view/widget/Probenzusatzwert.js app/view/widget/Staat.js app/view/widget/Status.js app/view/widget/Testdatensatz.js app/view/widget/Umwelt.js app/view/widget/Verwaltungseinheit.js app/view/widget/base/ComboBox.js app/view/widget/base/Datetime.js app/view/widget/base/FieldSet.js app/view/widget/base/TextField.js app/view/window/ProbeEdit.js
diffstat 80 files changed, 4219 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,108 @@
+/**
+ * Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+Ext.Loader.setConfig({
+    enabled: true,
+    paths: {
+        'Ext.ux.form.DateTimeField': 'resources/lib/datetime/UX_DateTimeField.js',
+        'Ext.ux.DateTimeMenu': 'resources/lib/datetime/UX_DateTimeMenu.js',
+        'Ext.ux.DateTimePicker': 'resources/lib/datetime/UX_DateTimePicker.js',
+        'Ext.ux.form.TimePickerField': 'resources/lib/datetime/UX_TimePickerField.js',
+        'Ext.i18n': 'resources/lib/i18n/'
+    }
+});
+
+Ext.application({
+
+    // Name of the application. Do not change as this name is used in
+    // references!
+    name: 'Lada',
+
+    // Setting up translations. This is done using a ext-plgin which can be
+    // found on https://github.com/elmasse/Ext.i18n.Bundle
+    requires: [
+        'Lada.override.Table',
+        'Ext.i18n.Bundle',
+        'Ext.layout.container.Column',
+        'Lada.store.Datenbasis',
+        'Lada.store.Messeinheiten',
+        'Lada.store.Messgroessen',
+        'Lada.store.Messmethoden',
+        'Lada.store.Messstellen',
+        'Lada.store.Netzbetreiber',
+        'Lada.store.Locations',
+        'Lada.store.Pflichtmessgroessen',
+        'Lada.store.Probenarten',
+        'Lada.store.Probenzusaetze',
+        'Lada.store.Staaten',
+        'Lada.store.Umwelt',
+        'Lada.store.Verwaltungseinheiten'
+    ],
+    bundle: {
+        bundle: 'Lada',
+        lang: 'de-DE',
+        path: 'resources/i18n',
+        noCache: true
+    },
+
+    // Setting this variable to true triggers loading the Viewport.js
+    // file which sets ob the viewport.
+    autoCreateViewport: true,
+
+    // Start the application.
+    launch: function() {
+        Ext.create('Lada.store.Datenbasis', {
+            storeId: 'datenbasis'
+        });
+        Ext.create('Lada.store.Messeinheiten', {
+            storeId: 'messeinheiten'
+        });
+        Ext.create('Lada.store.Messgroessen', {
+            storeId: 'messgroessen'
+        });
+        Ext.create('Lada.store.Messmethoden', {
+            storeId: 'messmethoden'
+        });
+        Ext.create('Lada.store.Messstellen', {
+            storeId: 'messstellen'
+        });
+        Ext.create('Lada.store.Netzbetreiber', {
+            storeId: 'netzbetreiber'
+        });
+        Ext.create('Lada.store.Locations', {
+            storeId: 'locations'
+        });
+        Ext.create('Lada.store.Pflichtmessgroessen', {
+            storeId: 'pflichtmessgroessen'
+        });
+        Ext.create('Lada.store.Probenarten', {
+            storeId: 'probenarten'
+        });
+        Ext.create('Lada.store.Probenzusaetze', {
+            storeId: 'probenzusaetze'
+        });
+        Ext.create('Lada.store.Staaten', {
+            storeId: 'staaten'
+        });
+        Ext.create('Lada.store.Umwelt', {
+            storeId: 'umwelt'
+        });
+        Ext.create('Lada.store.Verwaltungseinheiten', {
+            storeId: 'verwaltungseinheiten'
+        });
+    },
+
+    // Define the controllers of the application. They will be initialized
+    // first before the application "launch" function is called.
+    controllers: [
+        'Lada.controller.Filter',
+        'Lada.controller.FilterResult',
+        'Lada.controller.ProbeForm',
+        'Lada.controller.OrtGrid'
+    ]
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controller/Filter.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,224 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Controller for the Filter
+ * This controller handles all logic related to the filter
+ */
+Ext.define('Lada.controller.Filter', {
+    extend: 'Ext.app.Controller',
+
+    requires: [
+        'Lada.view.widget.Messstelle',
+        'Lada.view.widget.Umwelt'
+    ],
+
+    stores: [
+        'ProbenList',    // List of found Proben
+        'Queries'
+    ],
+
+    init: function() {
+        this.control({
+            // CSS like selector to select element in the viewport. See
+            // ComponentQuery documentation for more details.
+            'combobox[name=filter]': {
+                // Map Doubleclick on rows of the probenlist.
+                select: this.selectSql
+            },
+            'button[action=search]': {
+                // Map click event on Button.
+                click: this.search
+            },
+            'button[action=reset]': {
+                // Map click event on Button.
+                click: this.reset
+            },
+            'menuitem[action=about]': {
+                // Map click event on Button.
+                click: this.about
+            }
+        });
+        this.callParent(arguments);
+    },
+
+    /**
+     * Function called when the user selects a SQL query in the dropdownlist.
+     * The function will hide/display additional element related to the
+     * selected search query
+     */
+    selectSql: function(element, record) {
+        var resultGrid = element.up('panel[name=main]').down('filterresultgrid');
+        var filters = element.up('panel[name=main]').down('fieldset[name=filtervariables]');
+        var columns = element.up('fieldset').down('displayfield[name=columns]');
+        var desc = element.up('fieldset').down('displayfield[name=description]');
+        var displayFields = record[0].data.results;
+        var filterFields = record[0].data.filters;
+
+        this.reset();
+
+        var columnString = [];
+        for (var i = 0; i < displayFields.length; i++) {
+            columnString.push(displayFields[i].header);
+        }
+        columns.setValue(columnString.join(', '));
+        desc.setValue(record[0].data.description);
+
+        // Setup Columns of the probenlist
+        displayFields.reverse();
+        resultGrid.setupColumns(displayFields);
+
+        // Setup Filters of the probenlist
+        //
+        // Allowed types are
+        // * text
+        // * number
+        // * datetime
+        // * bool
+        // * listmst
+        // * listumw
+        // * listver
+        // * listdbasis
+        // * listnetz
+        //
+        // Iterate over all configured filters and add filters dynamically
+        //
+        // 1. Empty filters
+        filters.removeAll();
+        var hide = true;
+        // 2. Iterate over all configured filters
+        var j;
+        for (j = 0; j < filterFields.length; j++) {
+            var type = filterFields[j].type;
+            var name = filterFields[j].dataIndex;
+            var label = filterFields[j].label;
+            var multi = filterFields[j].multiSelect;
+            var field = null;
+            if (type === 'text') {
+                field = Ext.create('Ext.form.field.Text', {
+                    name: name,
+                    fieldLabel: label
+                });
+            }
+            else if (type === 'number') {
+                field = Ext.create('Ext.form.field.Number', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label
+                });
+            }
+            else if (type === 'datetime') {
+                field = Ext.create('Lada.view.widgets.Datetime', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label
+                });
+            }
+            else if (type === 'bool') {
+                field = Ext.create('Lada.view.widgets.Testdatensatz', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label,
+                    emptyText: ''
+                });
+            }
+            else if (type === 'listmst') {
+                field = Ext.create('Lada.view.widgets.Messstelle', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type === 'listumw') {
+                field = Ext.create('Lada.view.widgets.Umwelt', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type === 'listdbasis') {
+                field = Ext.create('Lada.view.widgets.Datenbasis', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type === 'listver') {
+                field = Ext.create('Lada.view.widgets.Verwaltungseinheit', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            else if (type === 'listnetz') {
+                field = Ext.create('Lada.view.widgets.Netzbetreiber', {
+                    name: name,
+                    labelWidth: 135,
+                    fieldLabel: label,
+                    multiSelect: multi
+                });
+            }
+            if (field) {
+                filters.add(field);
+                filters.show();
+                hide = false;
+            }
+        }
+        if (hide) {
+            filters.hide();
+        }
+    },
+
+    /**
+     * Function is called when the user clicks the search button. The function
+     * will perform a search to the server on refreshes the result list.
+     */
+    search: function(element) {
+        var resultGrid = element.up('panel[name=main]').down('filterresultgrid');
+        var filters = element.up('panel[name=main]').down('fieldset[name=filtervariables]');
+        var search = element.up('fieldset').down('combobox[name=filter]');
+
+        // Get search parameters:
+        var searchParams = {};
+        searchParams['qid'] = search.getValue();
+        for (var i = filters.items.length - 1; i >= 0; i--) {
+            var filter = filters.items.items[i];
+            var value = filter.getValue();
+            if (value instanceof Array) {
+                value = value.join(',');
+            }
+            searchParams[filter.getName()] = value;
+        }
+        resultGrid.getStore().load({
+            params: searchParams
+        });
+        resultGrid.show();
+    },
+
+    reset: function() {
+        // var buttons = Ext.getCmp('SearchBtnPanel');
+        // var result = Ext.getCmp('result');
+        // for (var i = 0; i < queries.length; ++i) {
+        //     var toHide = Ext.getCmp(queries[i]);
+        //     toHide.hide();
+        // }
+        // result.hide();
+        // buttons.hide();
+    },
+
+    about: function() {
+        var info = this.getInfoStore();
+        Ext.widget('about', {
+            info: info
+        });
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controller/FilterResult.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,55 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Controller for filter result grid.
+ */
+Ext.define('Lada.controller.FilterResult', {
+    extend: 'Ext.app.Controller',
+    requires: [
+        'Lada.view.window.ProbeEdit'
+    ],
+
+    init: function() {
+        this.control({
+            'filterresultgrid': {
+                itemdblclick: this.editItem
+            },
+            'filterresultgrid toolbar button[action=add]': {
+                click: this.addItem
+            },
+            'filterresultgrid toolbar button[action=import]': {
+                click: this.uploadFile
+            },
+            'filterresultgrid toolbar button[action=export]': {
+                click: this.downloadFile
+            }
+        });
+        this.callParent(arguments);
+    },
+
+    editItem: function(grid, record) {
+        var win = Ext.create('Lada.view.window.ProbeEdit', {
+            record: record
+        });
+        win.show();
+        win.initData();
+    },
+
+    addItem: function(button) {
+
+    },
+
+    uploadFile: function(button) {
+
+    },
+
+    downloadFile: function(button) {
+
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controller/OrtGrid.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,65 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+Ext.define('Lada.controller.OrtGrid', {
+    extend: 'Ext.app.Controller',
+
+    init: function() {
+        this.control({
+            'ortgrid': {
+                selectionchange: this.selectionChanged,
+                edit: this.gridSave
+            },
+            'ortgrid button[action=open]': {
+                click: this.open
+            },
+            'ortgrid button[action=add]': {
+                click: this.add
+            },
+            'ortgrid button[action=delete]': {
+                click: this.remove
+            }
+        });
+    },
+
+    selectionChanged: function(grid, record) {
+        if (record) {
+            grid.view.panel.down('button[action=open]').enable();
+        }
+    },
+
+    gridSave: function(editor, context) {
+        context.record.save();
+        context.grid.store.reload();
+        context.grid.up('window').initData();
+    },
+
+    open: function() {
+        console.log('open');
+    },
+
+    add: function() {
+        console.log('add');
+    },
+
+    remove: function(button) {
+        var grid = button.up('grid');
+        var selection = grid.getView().getSelectionModel().getSelection()[0];
+        Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) {
+            if (btn === 'yes') {
+                selection.destroy({
+                    success: function() {
+                        button.up('window').initData();
+                    },
+                    failure: function() {
+                    }
+                });
+            }
+        });
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controller/ProbeForm.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,68 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+Ext.define('Lada.controller.ProbeForm', {
+    extend: 'Ext.app.Controller',
+
+    init: function() {
+        this.control({
+            'probeform button[action=save]': {
+                click: this.save
+            },
+            'probeform button[action=discard]': {
+                click: this.discard
+            },
+            'probeform': {
+                dirtychange: this.dirtyForm
+            }
+        });
+    },
+
+    save: function(button) {
+        var formPanel = button.up('form');
+        var data = formPanel.getForm().getFieldValues(true);
+        for (var key in data) {
+            formPanel.getForm().getRecord().set(key, data[key]);
+        }
+        formPanel.getForm().getRecord().save({
+            success: function(record, response) {
+                var json = Ext.decode(response.response.responseText);
+                if (response.action !== 'create' &&
+                    json &&
+                    json.success) {
+                    formPanel.setRecord(record);
+                    formPanel.setMessages(json.errors, json.warnings);
+                }
+            },
+            failure: function(record, response) {
+                console.log('failed...');
+                var json = response.request.scope.reader.jsonData;
+                if (json) {
+                    formPanel.setMessages(json.errors, json.warnings);
+                }
+            }
+        });
+        console.log('save');
+    },
+
+    discard: function(button) {
+        var formPanel = button.up('form');
+        formPanel.getForm().loadRecord(formPanel.getForm().getRecord());
+    },
+
+    dirtyForm: function(form, dirty) {
+        if (dirty) {
+            form.owner.down('button[action=save]').setDisabled(false);
+            form.owner.down('button[action=discard]').setDisabled(false);
+        }
+        else {
+            form.owner.down('button[action=save]').setDisabled(true);
+            form.owner.down('button[action=discard]').setDisabled(true);
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Datenbasis.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,39 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Datenbasis Stammdaten.
+ */
+Ext.define('Lada.model.Datenbasis', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifier (Primary key).
+     *  - beschreibung: The long description.
+     *  - datenbasis:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'datenbasis'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/datenbasis',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Location.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,65 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Ort Stammdaten
+ */
+Ext.define('Lada.model.Location', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'bezeichnung'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'unscharf'
+    }, {
+        name: 'nutsCode'
+    }, {
+        name: 'koordXExtern'
+    }, {
+        name: 'koordYExtern'
+    }, {
+        name: 'hoeheLand'
+    }, {
+        name: 'letzteAenderung',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'longitude',
+        type: 'float'
+    }, {
+        name: 'latitude',
+        type: 'float'
+    }, {
+        name: 'staatId'
+    }, {
+        name: 'verwaltungseinheitId'
+    }, {
+        name: 'otyp'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/location',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/MKommentar.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,45 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Kommentare on Messungen
+ */
+Ext.define('Lada.model.MKommentar', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'messungsId'
+    }, {
+        name: 'erzeuger'
+    }, {
+        name: 'datum',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'text'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/mkommentar',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Messeinheit.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,45 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messeinheit Stammdaten.
+ */
+Ext.define('Lada.model.Messeinheit', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifier (Primary key).
+     *  - beschreibung: The long description.
+     *  - einheit: The unit.
+     *  - eudfMesseinheitId:
+     *  - umrechnungsFaktorEudf:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'einheit'
+    }, {
+        name: 'eudfMesseinheitId'
+    }, {
+        name: 'umrechnungsFaktorEudf'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/messeinheit',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Messgroesse.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,53 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messgroesse Stammdaten.
+ */
+Ext.define('Lada.model.Messgroesse', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifier (Primary key).
+     *  - beschreibung: The long description.
+     *  - defaultFarbe:
+     *  - idfNuklidKey:
+     *  - istLeitNuklid:
+     *  - eudfNuklidId:
+     *  - kennungBvl:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'messgroesse'
+    }, {
+        name: 'defaultFarbe'
+    }, {
+        name: 'idfNuklidKey'
+    }, {
+        name: 'istLeitNuklid'
+    }, {
+        name: 'eudfNuklidId'
+    }, {
+        name: 'kennungBvl'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/messgroesse',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Messmethode.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,46 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messmethode Stammdaten.
+ */
+Ext.define('Lada.model.Messmethode', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifier (Primary key).
+     *  - beschreibung: The long description.
+     *  - messmethode:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'messmethode'
+    }, {
+        name: 'display',
+        persist: false,
+        convert: function(value, record) {
+            return record.get('id') + ' - ' + record.get('messmethode');
+        }
+
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/messmethode',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Messstelle.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,48 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Messstelle Stammdaten.
+ */
+Ext.define('Lada.model.Messstelle', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifier (Primary key).
+     *  - beschreibung: The long description.
+     *  - netzbetreiberId:
+     *  - messStelle:
+     *  - mstTyp:
+     *  - amtskennung:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'netzbetreiberId'
+    }, {
+        name: 'messStelle'
+    }, {
+        name: 'mstTyp'
+    }, {
+        name: 'amtskennung'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/messstelle',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Messung.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,64 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Messungen
+ */
+Ext.define('Lada.model.Messung', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'probeId'
+    }, {
+        name: 'mmtId'
+    }, {
+        name: 'nebenprobenNr'
+    }, {
+        name: 'messdauer'
+    }, {
+        name: 'messzeitpunkt',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date();
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'fertig',
+        type: 'boolean'
+    }, {
+        name: 'letzteAenderung',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date();
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'geplant',
+        type: 'boolean'
+    }, {
+        name: 'messungsIdAlt'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/messung',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Messwert.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,59 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Messwerte
+ */
+Ext.define('Lada.model.Messwert', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'messungsId'
+    }, {
+        name: 'messgroesseId'
+    }, {
+        name: 'messwert',
+        type: 'float'
+    }, {
+        name: 'messwertNwg'
+    }, {
+        name: 'messfehler',
+        type: 'float'
+    }, {
+        name: 'nwgZuMesswert',
+        type: 'float'
+    }, {
+        name: 'mehId'
+    }, {
+        name: 'grenzwertueberschreitung',
+        type: 'boolean'
+    }, {
+        name: 'letzteAenderung',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date();
+        },
+        defaultValue: new Date()
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'server/rest/messwert',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Netzbetreiber.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,51 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model for Netzbetreiber Stammdaten.
+ */
+Ext.define('Lada.model.Netzbetreiber', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifier (Primary key).
+     *  - netzbetreiber:
+     *  - idfNetzbetreiber:
+     *  - isBmn:
+     *  - mailverteiler:
+     *  - aktiv:
+     *  - zustMstId:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'netzbetreiber'
+    }, {
+        name: 'idfNetzbetreiber'
+    }, {
+        name: 'isBmn'
+    }, {
+        name: 'mailverteiler'
+    }, {
+        name: 'aktiv'
+    }, {
+        name: 'zustMstId'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/netzbetreiber',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Ort.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,49 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Ort
+ */
+Ext.define('Lada.model.Ort', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id',
+        type: 'int'
+    }, {
+        name: 'ort',
+        type: 'int'
+    }, {
+        name: 'probeId'
+    }, {
+        name: 'ortsTyp'
+    }, {
+        name: 'ortszusatztext'
+    }, {
+        name: 'letzteAenderung',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/ort',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/PKommentar.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,45 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Kommentare
+ */
+Ext.define('Lada.model.PKommentar', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'probeId'
+    }, {
+        name: 'erzeuger'
+    }, {
+        name: 'datum',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'text'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/pkommentar',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Pflichtmessgroesse.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,45 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Pflichtmessgroesse Stammdaten.
+ */
+Ext.define('Lada.model.Pflichtmessgroesse', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifer (Primary key)
+     *  - messgroesseId:
+     *  - mmtId:
+     *  - umwId:
+     *  - datenbasisId:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'messgroesseId'
+    }, {
+        name: 'mmtId'
+    }, {
+        name: 'umwId'
+    }, {
+        name: 'datenbasisId'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/pflichtmessgroesse',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Probe.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,118 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * A Probe.
+ * This class represents and defines the model of a 'Probe'
+ **/
+Ext.define('Lada.model.Probe', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'probeIdAlt'
+    }, {
+        name: 'hauptprobenNr'
+    }, {
+        name: 'test'
+    }, {
+        name: 'netzbetreiberId'
+    }, {
+        name: 'mstId'
+    }, {
+        name: 'datenbasisId'
+    }, {
+        name: 'baId'
+    }, {
+        name: 'probenartId'
+    }, {
+        name: 'mediaDesk'
+    }, {
+        name: 'media'
+    }, {
+        name: 'umwId'
+    }, {
+        name: 'probeentnahmeBeginn',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'probeentnahmeEnde',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'mittelungsdauer'
+    }, {
+        name: 'letzteAenderung',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'erzeugerId'
+    }, {
+        name: 'probeNehmerId'
+    }, {
+        name: 'mpKat'
+    }, {
+        name: 'mplId'
+    }, {
+        name: 'mprId'
+    }, {
+        name: 'solldatumBeginn',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'solldatumEnde',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }, {
+        name: 'readonly',
+        type: 'bool',
+        persist: false
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/probe',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/ProbeList.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,30 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * A ProbeList.
+ * This class represents the result list of 'Proben' in the search query
+ * */
+Ext.define('Lada.model.ProbeList', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'readonly'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/probe',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Probenart.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,42 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Probenart Stammdaten.
+ */
+Ext.define('Lada.model.Probenart', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifer (Primary key)
+     *  - beschreibung: The long description.
+     *  - probenart:
+     *  - probenartEudfId:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'probenart'
+    }, {
+        name: 'probenartEudfId'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/probenart',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Probenzusatz.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,46 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Probenzusatz Stammdaten.
+ */
+Ext.define('Lada.model.Probenzusatz', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifer (Primary key)
+     *  - beschreibung: The long description.
+     *  - mehId:
+     *  - zusatzwert:
+     *  - eudfKeyword:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'mehId',
+        type: 'int'
+    }, {
+        name: 'zusatzwert'
+    }, {
+        name: 'eudfKeyword'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/probenzusatz',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Query.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,37 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for SQL-Querys
+ */
+Ext.define('Lada.model.Query', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'name'
+    }, {
+        name: 'description'
+    }, {
+        name: 'sql'
+    }, {
+        name: 'results'
+    }, {
+        name: 'filters'
+    }],
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/query',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Staat.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,36 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Staat Stammdaten
+ */
+Ext.define('Lada.model.Staat', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id',
+        type: 'int'
+    }, {
+        name: 'staat'
+    }, {
+        name: 'staatIso'
+    }, {
+        name: 'staatKurz'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/staat',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Umwelt.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,42 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Umweltbereich Stammdaten.
+ */
+Ext.define('Lada.model.Umwelt', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifer (Primary key)
+     *  - beschreibung: The long description.
+     *  - umweltBereich:
+     *  - mehId:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'beschreibung'
+    }, {
+        name: 'mehId'
+    }, {
+        name: 'umweltBereich'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/umwelt',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Verwaltungseinheit.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,66 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Verwaltungseinheit Stammdaten.
+ */
+Ext.define('Lada.model.Verwaltungseinheit', {
+    extend: 'Ext.data.Model',
+
+    /**
+     * Fields are:
+     *  - id: The unique identifer (Primary key)
+     *  - beschreibung: The long description.
+     *  - umweltBereich:
+     *  - mehId:
+     */
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'bundeland'
+    }, {
+        name: 'kdaId'
+    }, {
+        name: 'kreis'
+    }, {
+        name: 'nuts'
+    }, {
+        name: 'regbezirk'
+    }, {
+        name: 'bezeichnung'
+    }, {
+        name: 'isBundeland'
+    }, {
+        name: 'isGemeinde'
+    }, {
+        name: 'isLandkreis'
+    }, {
+        name: 'isRegbezirk'
+    }, {
+        name: 'koordXExtern'
+    }, {
+        name: 'koordYExtern'
+    }, {
+        name: 'plz'
+    }, {
+        name: 'longitude'
+    }, {
+        name: 'latitude'
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/verwaltungseinheit',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Zusatzwert.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,52 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Model class for Zusatzwerte
+ */
+Ext.define('Lada.model.Zusatzwert', {
+    extend: 'Ext.data.Model',
+
+    fields: [{
+        name: 'id'
+    }, {
+        name: 'probeId'
+    }, {
+        name: 'pzsId'
+    }, {
+        name: 'nwgZuMesswert',
+        type: 'float'
+    }, {
+        name: 'messwertPzs',
+        type: 'float'
+    }, {
+        name: 'messfehler',
+        type: 'float'
+    }, {
+        name: 'letzteAenderung',
+        type: 'date',
+        convert: function(v) {
+            if (!v) {
+                return v;
+            }
+            return new Date(v);
+        },
+        defaultValue: new Date()
+    }],
+
+    idProperty: 'id',
+
+    proxy: {
+        type: 'rest',
+        url: 'lada-server/zusatzwert',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/override/Table.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,36 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+Ext.define('Lada.override.Table', {
+    override: 'Ext.view.Table',
+
+    doStripeRows: function(startRow, endRow) {
+        var me = this;
+        var rows;
+        var rowsLn;
+        var i;
+        var row;
+
+        if (me.rendered && me.stripeRows) {
+            rows = me.getNodes(startRow, endRow);
+
+            for (i = 0, rowsLn = rows.length; i < rowsLn; i++) {
+                row = rows[i];
+
+                if (row) { // self updating; check for row existence
+                    row.className = row.className.replace(me.rowClsRe, ' ');
+                    startRow++;
+
+                    if (startRow % 2 === 0) {
+                        row.className += (' ' + me.altRowCls);
+                    }
+                }
+            }
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Datenbasis.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Datenbasis
+ */
+Ext.define('Lada.store.Datenbasis', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Datenbasis',
+    sorters: [{
+        property: 'datenbasis',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Locations.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,19 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Ortedetails
+ */
+Ext.define('Lada.store.Locations', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Location',
+    sorters: [{
+        property: 'bezeichnung'
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/MKommentare.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,15 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Kommentare
+ */
+Ext.define('Lada.store.MKommentare', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.MKommentar'
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Messeinheiten.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Messeinheit
+ */
+Ext.define('Lada.store.Messeinheiten', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Messeinheit',
+    sorters: [{
+        property: 'einheit',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Messgroessen.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Messgroessen
+ */
+Ext.define('Lada.store.Messgroessen', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Messgroesse',
+    sorters: [{
+        property: 'messgroesse',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Messmethoden.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Messmethoden
+ */
+Ext.define('Lada.store.Messmethoden', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Messmethode',
+    sorters: [{
+        property: 'messmethode',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Messstellen.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Messstellen
+ */
+Ext.define('Lada.store.Messstellen', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Messstelle',
+    sorters: [{
+        property: 'messStelle',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Messungen.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,16 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details. 
+ */
+
+/**
+ * Store for Messungen
+ */
+Ext.define('Lada.store.Messungen', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Messung'
+});
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Messwerte.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,16 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details. 
+ */
+
+/**
+ * Store for Messwerte
+ */
+Ext.define('Lada.store.Messwerte', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Messwert'
+});
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Netzbetreiber.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Netzbetreiber
+ */
+Ext.define('Lada.store.Netzbetreiber', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Netzbetreiber',
+    sorters: [{
+        property: 'netzbetreiber',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Orte.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,15 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details. 
+ */
+
+/**
+ * Store for Orte
+ */
+Ext.define('Lada.store.Orte', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Ort'
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/PKommentare.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,15 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Kommentare
+ */
+Ext.define('Lada.store.PKommentare', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.PKommentar'
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Pflichtmessgroessen.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,16 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Pflichtmessgroessen
+ */
+Ext.define('Lada.store.Pflichtmessgroessen', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Pflichtmessgroesse',
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Proben.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,15 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details. 
+ */
+
+/**
+ * Store for Proben
+ */
+Ext.define('Lada.store.Proben', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Probe'
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/ProbenList.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,15 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details. 
+ */
+
+/**
+ * Store for Proben
+ */
+Ext.define('Lada.store.ProbenList', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.ProbeList'
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Probenarten.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Probenarten
+ */
+Ext.define('Lada.store.Probenarten', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Probenart',
+    sorters: [{
+        property: 'probenart',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Probenzusaetze.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Probenzusaetze
+ */
+Ext.define('Lada.store.Probenzusaetze', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Probenzusatz',
+    sorters: [{
+        property: 'zusatzwert',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Probenzusatzwerte.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,19 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details. 
+ */
+
+/**
+ * Store for Probenzusatzwerte
+ */
+Ext.define('Lada.store.Probenzusatzwerte', {
+    extend: 'Ext.data.Store',
+    sorters: [{
+        property: 'beschreibung'
+    }],
+    autoLoad: true,
+    model: 'Lada.model.Probenzusatzwert'
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Queries.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,16 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details. 
+ */
+
+/**
+ * Store for Queries
+ */
+Ext.define('Lada.store.Queries', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Query',
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Staaten.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,19 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Staaten
+ */
+Ext.define('Lada.store.Staaten', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Staat',
+    sorters: [{
+        property: 'staat'
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Status.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,16 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Status
+ */
+Ext.define('Lada.store.Status', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Status',
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Umwelt.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Umweltbereiche
+ */
+Ext.define('Lada.store.Umwelt', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Umwelt',
+    sorters: [{
+        property: 'umweltBereich',
+        transform: function(val) {
+            if (val) {
+                return val.toLowerCase();
+            }
+            return '';
+        }
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Verwaltungseinheiten.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,19 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Verwaltungseinheiten
+ */
+Ext.define('Lada.store.Verwaltungseinheiten', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Verwaltungseinheit',
+    sorters: [{
+        property: 'bezeichnung'
+    }],
+    autoLoad: true
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Zusatzwerte.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,16 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Store for Zusatzwerte
+ */
+Ext.define('Lada.store.Zusatzwerte', {
+    extend: 'Ext.data.Store',
+    autoLoad: true,
+    model: 'Lada.model.Zusatzwert'
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/FilterPanel.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,69 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/*
+ * Panel to show available search queryies
+ */
+Ext.define('Lada.view.FilterPanel', {
+    extend: 'Ext.form.FieldSet',
+    alias: 'widget.filterpanel',
+
+    require: [
+        'Ext.layout.container.Column'
+    ],
+
+    title: 'Filter-Auswahl',
+    initComponent: function() {
+        this.layout = {
+            type: 'vbox',
+            align: 'stretch'
+        };
+        this.items = [{
+            xtype: 'combobox',
+            name: 'filter',
+            editable: false,
+            store: 'Queries',
+            displayField: 'name',
+            valueField: 'id',
+            emptyText: 'Wählen Sie eine Abfrage'
+        }, {
+            xtype: 'panel',
+            border: false,
+            margin: '0 0 10 0',
+            items: [{
+                xtype: 'button',
+                action: 'search',
+                text: 'Suchen',
+                margin: '0 10 0 0'
+            }, {
+                xtype: 'button',
+                action: 'reset',
+                text: 'Zurücksetzen'
+            }],
+            hidden: false
+        }, {
+            xtype: 'panel',
+            maxWidth: '500',
+            border: false,
+            margin: '0 10',
+            items: [{
+                xtype: 'displayfield',
+                name: 'description',
+                fieldLabel: 'Beschreibung',
+                shrinkWrap: 3,
+                value: '-/-'
+            }, {
+                xtype: 'displayfield',
+                name: 'columns',
+                fieldLabel: 'Spalten',
+                value: '-/-'
+            }]
+        }];
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/Viewport.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,94 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Viewport for the Lada-Client
+ *
+ * The viewport initialises the graphical elements of the application. For
+ * debugging it is possible to initialize other components directly see the
+ * initComponent function.
+ */
+Ext.define('Lada.view.Viewport', {
+    extend: 'Ext.container.Viewport',
+    requires: [
+        'Lada.view.FilterPanel',
+        'Lada.view.grid.FilterResult'
+    ],
+    layout: 'fit',
+    initComponent: function() {
+        this.items = [{
+            title: '<center>Labordatenerfassung</center>',
+            layout: 'border',
+            name: 'main',
+            items: [{
+                layout: {
+                    type: 'vbox',
+                    align: 'stretch'
+                },
+                region: 'west',
+                split: true,
+                border: 1,
+                flex: 1,
+                dockedItems: [{
+                    xtype: 'toolbar',
+                    dock: 'top',
+                    items: [{
+                        xtype: 'splitbutton',
+                        text: 'Info',
+                        menu: {
+                            items: [{
+                                text: 'About',
+                                action: 'about'
+                            }]
+                        }
+                    }, '->', {
+                        xtype: 'box',
+                        autoEl: {
+                            tag: 'img',
+                            src: 'resources/img/user-identity.png'
+                        }
+                    }, {
+                        xtype: 'tbtext',
+                        id: 'userinfo',
+                        text: ''
+                    }, {
+                        xtype: 'box',
+                        autoEl: {
+                            tag: 'img',
+                            src: 'resources/img/network-workgroup.png'
+                        }
+                    }, {
+                        xtype: 'tbtext',
+                        id: 'groupinfo',
+                        text: ''
+                    }]
+                }],
+                items: [{
+                    // Auswahl einer Abfrage.
+                    xtype: 'filterpanel',
+                    margin: '0, 10, 0, 10'
+                }, {
+                // Variables settings for the current selected sql statement.
+                    xtype: 'fieldset',
+                    name: 'filtervariables',
+                    title: 'Variablenbelegung',
+                    hidden: true,
+                    margin: '0, 10, 0, 10',
+                    items: []
+                }]
+            }, {
+            // Resultlist for the query.
+                flex: 3,
+                xtype: 'filterresultgrid',
+                hidden: false,
+                region: 'center'
+            }]
+        }];
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/form/Probe.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,414 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/*
+ * Formular to edit a Probe
+ */
+Ext.define('Lada.view.form.Probe', {
+    extend: 'Ext.form.Panel',
+    alias: 'widget.probeform',
+    requires: [
+        'Lada.view.widget.Datenbasis',
+        'Lada.view.widget.Netzbetreiber',
+        'Lada.view.widget.Betriebsart',
+        'Lada.view.widget.Testdatensatz',
+        'Lada.view.widget.Probenart',
+        'Lada.view.widget.Umwelt',
+        'Lada.view.widget.base.TextField',
+        'Lada.view.widget.base.Datetime',
+        'Lada.view.widget.base.FieldSet',
+        'Lada.model.Probe'
+    ],
+
+    model: 'Lada.model.Probe',
+    minWidth: 650,
+    margin: 5,
+    border: 0,
+
+    recordId: null,
+
+    trackResetOnLoad: true,
+
+    initComponent: function() {
+        var me = this;
+        this.items = [{
+            xtype: 'fieldset',
+            title: 'Allgemein',
+            items: [{
+                border: 0,
+                margin: '0, 0, 10, 0',
+                dockedItems: [{
+                    xtype: 'toolbar',
+                    dock: 'bottom',
+                    border: '0, 1, 1, 1',
+                    style: {
+                        borderBottom: '1px solid #b5b8c8 !important',
+                        borderLeft: '1px solid #b5b8c8 !important',
+                        borderRight: '1px solid #b5b8c8 !important'
+                    },
+                    items: ['->', {
+                        text: 'Speichern',
+                        qtip: 'Daten speichern',
+                        icon: 'resources/img/dialog-ok-apply.png',
+                        action: 'save',
+                        disabled: true
+                    }, {
+                        text: 'Verwerfen',
+                        qtip: 'Änderungen verwerfen',
+                        icon: 'resources/img/dialog-cancel.png',
+                        action: 'discard',
+                        disabled: true
+                    }]
+                }],
+                items: [{
+                    layout: 'hbox',
+                    border: 0,
+                    items: [{
+                        border: 0,
+                        width: '50%',
+                        minWidth: 290,
+                        layout: {
+                            type: 'vbox',
+                            align: 'stretch'
+                        },
+                        margin: '0, 10, 0, 0',
+                        items: [{
+                            xtype: 'messtelle',
+                            name: 'mstId',
+                            fieldLabel: 'Messstelle',
+                            labelWidth: 135,
+                            allowBlank: false
+                        }, {
+                            xtype: 'tfield',
+                            name: 'hauptprobenNr',
+                            maxLength: 20,
+                            fieldLabel: 'Hauptprobennr.',
+                            labelWidth: 135
+                        }]
+                    }, {
+                        border: 0,
+                        width: '50%',
+                        minWidth: 300,
+                        items: [{
+                            xtype: 'fset',
+                            title: 'Erweiterte Angaben',
+                            collapsible: true,
+                            collapsed: true,
+                            items: [{
+                                xtype: 'datenbasis',
+                                editable: false,
+                                name: 'datenbasisId',
+                                fieldLabel: 'Datenbasis',
+                                labelWidth: 100,
+                                listeners: {
+                                    dirtychange: {
+                                        fn: this.updateOnChange,
+                                        scope: me
+                                    }
+                                }
+                            }, {
+                                xtype: 'betriebsart',
+                                name: 'baId',
+                                fieldLabel: 'Betriebsart',
+                                labelWidth: 100,
+                                listeners: {
+                                    dirtychange: {
+                                        fn: this.updateOnChange,
+                                        scope: me
+                                    }
+                                }
+                            }, {
+                                xtype: 'testdatensatz',
+                                name: 'test',
+                                fieldLabel: 'Testdatensatz',
+                                labelWidth: 100,
+                                allowBlank: false,
+                                listeners: {
+                                    dirtychange: {
+                                        fn: this.updateOnChange,
+                                        scope: me
+                                    }
+                                }
+                            }, {
+                                xtype: 'probenart',
+                                editable: false,
+                                name: 'probenartId',
+                                fieldLabel: 'Probenart',
+                                labelWidth: 100,
+                                allowBlank: false,
+                                listeners: {
+                                    dirtychange: {
+                                        fn: this.updateOnChange,
+                                        scope: me
+                                    }
+                                }
+                            }, {
+                                xtype: 'numberfield',
+                                allowDecimals: false,
+                                name: 'probeNehmerId',
+                                fieldLabel: 'Probennehmer',
+                                labelWidth: 100,
+                                listeners: {
+                                    dirtychange: {
+                                        fn: this.updateOnChange,
+                                        scope: me
+                                    }
+                                }
+                            }, {
+                                xtype: 'netzbetreiber',
+                                name: 'netzbetreiberId',
+                                editable: false,
+                                fieldLabel: 'Netzbetreiber',
+                                labelWidth: 100,
+                                allowBlank: false,
+                                listeners: {
+                                    dirtychange: {
+                                        fn: this.updateOnChange,
+                                        scope: me
+                                    }
+                                }
+                            }, {
+                                xtype: 'tfield',
+                                name: 'x11',
+                                fieldLabel: 'Datensatzerzeuger',
+                                labelWidth: 100,
+                                listeners: {
+                                    dirtychange: {
+                                        fn: this.updateOnChange,
+                                        scope: me
+                                    }
+                                }
+                            }]
+                        }]
+                    }]
+                }, {
+                    // Medium
+                    xtype: 'fieldset',
+                    title: 'Medium',
+                    items: [{
+                        border: 0,
+                        layout: {
+                            type: 'vbox',
+                            align: 'stretch'
+                        },
+                        width: '100%',
+                        items: [{
+                            xtype: 'textfield',
+                            name: 'media',
+                            labelWidth: 125,
+                            fieldLabel: 'Medienbezeichnung',
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }, {
+                            xtype: 'textfield',
+                            maxLength: 100,
+                            name: 'mediaDesk',
+                            labelWidth: 125,
+                            fieldLabel: 'Deskriptoren',
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }, {
+                            xtype: 'umwelt',
+                            name: 'umwId',
+                            fieldLabel: 'Umweltbereich',
+                            labelWidth: 125,
+                            allowBlank: false,
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }, {
+                            xtype: 'fieldset',
+                            title: 'Details Deskriptoren',
+                            collapsible: true,
+                            collapsed: true,
+                            defaultType: 'textfield',
+                            layout: {
+                                type: 'table',
+                                columns: 3
+                            },
+                            items: this.buildDescriptors(),
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }]
+                    }]
+                }, {
+                    // Zeit
+                    xtype: 'fieldset',
+                    title: 'Zeit',
+                    layout: {
+                        type: 'hbox'
+                    },
+                    items: [{
+                        layout: {
+                            type: 'vbox',
+                            align: 'stretch'
+                        },
+                        border: 0,
+                        items: [{
+                            xtype: 'datetime',
+                            fieldLabel: 'Probennahme Beginn',
+                            fieldMargin: '0, 10, 5, 0',
+                            labelWidth: 125,
+                            name: 'probeentnahmeBeginn',
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }, {
+                            xtype: 'datetime',
+                            fieldLabel: 'Probennahme Ende',
+                            fieldMargin: '0, 10, 5, 0',
+                            labelWidth: 125,
+                            name: 'probeentnahmeEnde',
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }]
+                    }, {
+                        layout: 'vbox',
+                        border: 0,
+                        items: [{
+                            xtype: 'datetime',
+                            fieldLabel: 'Sollzeit Von',
+                            fieldMargin: '0, 10, 5, 0',
+                            labelWidth: 90,
+                            name: 'solldatumBeginn',
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }, {
+                            xtype: 'datetime',
+                            fieldLabel: 'Sollzeit Bis',
+                            fieldMargin: '0, 10, 5, 0',
+                            labelWidth: 90,
+                            name: 'solldatumEnde',
+                            listeners: {
+                                dirtychange: {
+                                    fn: this.updateOnChange,
+                                    scope: me
+                                }
+                            }
+                        }]
+                    }]
+                }]
+            }]
+        }];
+        this.callParent(arguments);
+    },
+
+    setRecord: function(record) {
+        this.getForm().loadRecord(record);
+    },
+
+    setMessages: function(errors, warnings) {
+        var key;
+        var element;
+        var content;
+        var i18n = Lada.getApplication().bundle;
+        if (warnings) {
+            for (key in warnings) {
+                element = this.down('component[name=' + key + ']');
+                if (!element) {
+                    continue;
+                }
+                content = warnings[key];
+                var warnText = '';
+                for (var i = 0; i < content.length; i++) {
+                    warnText += i18n.getMsg(content[i].toString()) + '\n';
+                }
+                element.showWarnings(warnText);
+            }
+        }
+        if (errors) {
+            for (key in errors) {
+                element = this.down('component[name=' + key + ']');
+                if (!element) {
+                    continue;
+                }
+                content = errors[key];
+                var errorText = '';
+                for (var i = 0; i < content.length; i++) {
+                    errorText += i18n.getMsg(content[i].toString()) + '\n';
+                }
+                element.showErrors(errorText);
+            }
+        }
+    },
+
+    clearMessages: function() {
+        this.down('cbox[name=mstId]').clearWarningOrError();
+        this.down('tfield[name=hauptprobenNr]').clearWarningOrError();
+        this.down('cbox[name=datenbasisId]').clearWarningOrError();
+        this.down('cbox[name=baId]').clearWarningOrError();
+        this.down('cbox[name=test]').clearWarningOrError();
+        this.down('cbox[name=probenartId]').clearWarningOrError();
+        this.down('cbox[name=netzbetreiberId]').clearWarningOrError();
+        this.down('tfield[name=x11]').clearWarningOrError();
+        this.down('cbox[name=umwId]').clearWarningOrError();
+        this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError();
+        this.down('datetime[name=probeentnahmeEnde]').clearWarningOrError();
+        this.down('datetime[name=solldatumBeginn]').clearWarningOrError();
+        this.down('datetime[name=solldatumEnde]').clearWarningOrError();
+        //this.down('cbox[name=probeNehmerId]').setReadOnly(value);
+    },
+
+    setReadOnly: function(value) {
+        this.down('cbox[name=mstId]').setReadOnly(value);
+        this.down('tfield[name=hauptprobenNr]').setReadOnly(value);
+        this.down('cbox[name=datenbasisId]').setReadOnly(value);
+        this.down('cbox[name=baId]').setReadOnly(value);
+        this.down('cbox[name=test]').setReadOnly(value);
+        this.down('cbox[name=probenartId]').setReadOnly(value);
+        this.down('cbox[name=netzbetreiberId]').setReadOnly(value);
+        this.down('tfield[name=x11]').setReadOnly(value);
+        this.down('textfield[name=media]').setReadOnly(value);
+        this.down('textfield[name=mediaDesk]').setReadOnly(value);
+        this.down('cbox[name=umwId]').setReadOnly(value);
+        this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value);
+        this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value);
+        this.down('datetime[name=solldatumBeginn]').setReadOnly(value);
+        this.down('datetime[name=solldatumEnde]').setReadOnly(value);
+        //this.down('cbox[name=probeNehmerId]').setReadOnly(value);
+    },
+
+    buildDescriptors: function() {
+        var fields = [];
+        for (var i = 0; i < 12; i++) {
+            fields[i] = {
+                fieldLabel: 'S' + i,
+                name: 's' + i,
+                labelWidth: 25,
+                margin: '0, 10, 5, 0'
+            };
+        }
+        return fields;
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/grid/FilterResult.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,82 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/*
+ * Grid to list Proben
+ */
+Ext.define('Lada.view.grid.FilterResult', {
+    extend: 'Ext.grid.Panel',
+    alias: 'widget.filterresultgrid',
+
+    store: 'ProbenList',
+
+    multiSelect: true,
+
+    viewConfig: {
+        emptyText: 'Keine Proben gefunden.',
+        deferEmptyText: false
+    },
+
+    initComponent: function() {
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'top',
+            items: [{
+                text: 'Hinzufügen',
+                icon: 'resources/img/list-add.png',
+                action: 'add'
+            }, {
+                text: 'Import',
+                icon: 'resources/img/svn-commit.png',
+                action: 'import'
+            }, {
+                text: 'Export',
+                icon: 'resources/img/svn-update.png',
+                action: 'export'
+            }]
+        }];
+        this.columns = [];
+        this.callParent(arguments);
+    },
+
+    /**
+     * Setup columns of the Grid dynamically based on a list of given cols.
+     * The function is called from the {@link Lada.controller.Sql#selectSql
+     * select sql event}
+     */
+    setupColumns: function(cols) {
+        var resultColumns = [];
+        var fields = [];
+
+        resultColumns.push({
+            header: 'RW',
+            dataIndex: 'readonly',
+            width: 30,
+            renderer: function(value) {
+                if (value) {
+                    return '<img src="resources/img/lock_16x16.png"/>';
+                }
+                return '<img src="resources/img/unlock_16x16.png"/>';
+            }
+        });
+        fields.push(new Ext.data.Field({
+            name: 'readonly'
+        }));
+        for (var i = cols.length - 1; i >= 0; i--) {
+            if (cols[i] === 'id') {
+                continue;
+            }
+            resultColumns.push(cols[i]);
+            fields.push(new Ext.data.Field({
+                name: cols[i].dataIndex
+            }));
+        }
+        this.store.model.setFields(fields);
+        this.reconfigure(this.store, resultColumns);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/grid/Ort.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,139 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/*
+ * Grid to list Orte
+ */
+Ext.define('Lada.view.grid.Ort', {
+    extend: 'Ext.grid.Panel',
+    alias: 'widget.ortgrid',
+
+    maxHeight: 350,
+    emptyText: 'Keine Orte gefunden.',
+        // minHeight and deferEmptyText are needed to be able to show the
+        // emptyText message.
+    minHeight: 110,
+    viewConfig: {
+        deferEmptyText: false
+    },
+    margin: '0, 5, 5, 5',
+
+    recordId: null,
+
+    warnings: null,
+    errors: null,
+
+    initComponent: function() {
+        var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
+            clicksToMoveEditor: 1,
+            autoCancel: false,
+            itemId: 'rowedit'
+        });
+        this.plugins = [rowEditing];
+
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'bottom',
+            items: ['->', {
+                text: 'Details',
+                icon: 'resources/img/document-open.png',
+                action: 'open',
+                disabled: true
+            }, {
+                text: 'Hinzufügen',
+                icon: 'resources/img/list-add.png',
+                action: 'add',
+                probeId: this.probeId
+            }, {
+                text: 'Löschen',
+                icon: 'resources/img/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'Typ',
+            dataIndex: 'ortsTyp',
+            width: 50,
+            editor: {
+                allowBlank: false
+            }
+        }, {
+            header: 'Staat',
+            dataIndex: 'ort',
+            width: 70,
+            renderer: function(value) {
+                var store = Ext.data.StoreManager.get('locations');
+                var staaten = Ext.data.StoreManager.get('staaten');
+                var record =
+                    staaten.getById(store.getById(value).get('staatId'));
+                return record.get('staatIso');
+            }
+        }, {
+            header: 'Gemeineschlüssel',
+            dataIndex: 'ort',
+            width: 120,
+            renderer: function(value) {
+                var store = Ext.data.StoreManager.get('locations');
+                var record = store.getById(value);
+                return record.get('verwaltungseinheitId');
+            }
+        }, {
+            header: 'Gemeindename',
+            dataIndex: 'ort',
+            flex: 1,
+            renderer: function(value) {
+                var store = Ext.data.StoreManager.get('locations');
+                var gemeinden =
+                    Ext.data.StoreManager.get('verwaltungseinheiten');
+                var record = store.getById(value);
+                var gemid = record.get('verwaltungseinheitId');
+                var record2 = gemeinden.getById(gemid);
+                return record2.get('bezeichnung');
+            }
+        }, {
+            header: 'Messpunkt',
+            dataIndex: 'ort',
+            renderer: function(value) {
+                var store = Ext.getStore('locations');
+                var record = store.getById(value);
+                return record.get('bezeichnung');
+            }
+        }];
+        this.initData();
+        this.callParent(arguments);
+    },
+
+    initData: function() {
+        this.store = Ext.create('Lada.store.Orte');
+        this.store.load({
+            params: {
+                probeId: this.recordId
+            }
+        });
+        Ext.ClassManager.get('Lada.model.Probe').load(this.recordId, {
+            failure: function(record, action) {
+                // TODO
+            },
+            success: function(record, response) {
+                var json = Ext.decode(response.response.responseText);
+                if (json) {
+                    this.warnings = json.warnings;
+                    this.errors = json.errors;
+                }
+            },
+            scope: this
+        });
+    },
+
+
+    setReadOnly: function() {
+        this.getPlugin('rowedit').disable();
+        this.down('button[action=add]').disable();
+        this.down('button[action=delete]').disable();
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/grid/PKommentar.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,74 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/*
+ * Grid to list Kommentare
+ */
+Ext.define('Lada.view.grid.PKommentar', {
+    extend: 'Ext.grid.Panel',
+    alias: 'widget.pkommentargrid',
+
+    requires: [
+        'Ext.toolbar.Toolbar'
+    ],
+
+    maxHeight: 350,
+    emptyText: 'Keine Kommentaregefunden.',
+    minHeight: 65,
+    viewConfig: {
+        deferEmptyText: false
+    },
+
+    recordId: null,
+
+    initComponent: function() {
+        var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
+            clicksToMoveEditor: 1,
+            autoCancel: false
+        });
+        this.plugins = [rowEditing];
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'bottom',
+            items: ['->', {
+                text: 'Hinzufügen',
+                icon: 'resources/img/list-add.png',
+                action: 'add',
+                probeId: this.probeId
+            }, {
+                text: 'Löschen',
+                icon: 'resources/img/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'Erzeuger',
+            dataIndex: 'erzeuger',
+            editor: {
+                allowBlank: false
+            }
+        }, {
+            header: 'Datum',
+            dataIndex: 'datum',
+            editor: {
+                xtype: 'datefield',
+                allowBlank: false,
+                format: 'd.m.Y',
+                maxValue: Ext.Date.format(new Date(), 'd.m.Y')
+            }
+        }, {
+            header: 'Text',
+            dataIndex: 'text',
+            flex: 1,
+            editor: {
+                allowBlank: false
+            }
+        }];
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/grid/Probenzusatzwert.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,114 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/*
+ * Grid to list Probenzusatzwerte
+ */
+Ext.define('Lada.view.grid.Probenzusatzwert', {
+    extend: 'Ext.grid.Panel',
+    alias: 'widget.probenzusatzwertgrid',
+    requires: [
+        'Lada.view.widget.Probenzusatzwert'
+    ],
+
+    maxHeight: 350,
+    emptyText: 'Keine Zusatzwerte gefunden.',
+    minHeight: 110,
+    viewConfig: {
+        deferEmptyText: false
+    },
+    margin: '0, 5, 5, 5',
+
+    recordId: null,
+
+    initComponent: function() {
+        var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
+            clicksToMoveEditor: 1,
+            autoCancel: false
+        });
+        this.plugins = [rowEditing];
+        this.dockedItems = [{
+            xtype: 'toolbar',
+            dock: 'bottom',
+            items: ['->', {
+                text: 'Details',
+                icon: 'resources/img/document-open.png',
+                action: 'open',
+                disabled: true
+            }, {
+                text: 'Hinzufügen',
+                icon: 'resources/img/list-add.png',
+                action: 'add',
+                probeId: this.probeId
+            }, {
+                text: 'Löschen',
+                icon: 'resources/img/list-remove.png',
+                action: 'delete'
+            }]
+        }];
+        this.columns = [{
+            header: 'PZW-ID',
+            dataIndex: 'id',
+            editor: {
+                xtype: 'numberfield',
+                allowBlank: false
+            }
+        }, {
+            header: 'PZW-Größe',
+            dataIndex: 'pzsId',
+            renderer: function(value) {
+                var store = Ext.data.StoreManager.get('probenzusaetze');
+                var record = store.getById(value);
+                return record.get('beschreibung');
+            },
+            flex: 1,
+            editor: {
+                xtype: 'probenzusatzwert'
+            }
+        }, {
+            header: 'Messwert',
+            dataIndex: 'id',
+            renderer: function(value) {
+                var record = this.store.getById(value);
+                var messwert = record.get('messwertPzs');
+                var nwg = record.get('nwgZuMesswert');
+                if (messwert < nwg) {
+                    return '<' + messwert;
+                }
+                return messwert;
+            }
+        }, {
+            header: 'rel. Unsich.[%]',
+            dataIndex: 'messfehler',
+            editor: {
+                allowBlank: false
+            }
+        }, {
+            header: 'Maßeinheit',
+            dataIndex: 'pzsId',
+            renderer: function(value) {
+                var zstore = Ext.data.StoreManager.get('probenzusaetze');
+                var mstore = Ext.data.StoreManager.get('messeinheiten');
+                var mehId = zstore.getById(value).get('mehId');
+                var record = mstore.findRecord('id', mehId);
+                return record.get('einheit');
+            }
+        }];
+        this.initData();
+        this.callParent(arguments);
+    },
+
+    initData: function() {
+        this.store = Ext.create('Lada.store.Zusatzwerte');
+        this.store.load({
+            params: {
+                probeId: this.recordId
+            }
+        });
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Betriebsart.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,35 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+var betriebsartStore = Ext.create('Ext.data.Store', {
+    fields: ['betriebsartId', 'betriebsart'],
+    data: [{
+        'betriebsartId': '1',
+        'betriebsart': 'Normal-/Routinebtrieb'
+    }, {
+        'betriebsartId': '2',
+        'betriebsart': 'Störfall/Intensivbetrieb'
+    }]
+});
+
+/**
+ * Combobox for Betriebsart
+ */
+Ext.define('Lada.view.widget.Betriebsart', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.betriebsart',
+    store: betriebsartStore,
+    queryMode: 'local',
+    displayField: 'betriebsart',
+    valueField: 'betriebsartId',
+    emptyText: 'Wählen Sie eine Betriebsart',
+
+    initComponent: function() {
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Datenbasis.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Datenbasis
+ */
+Ext.define('Lada.view.widget.Datenbasis', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.datenbasis',
+    store: 'Datenbasis',
+    displayField: 'datenbasis',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Datenbasis',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('datenbasis');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Datenbasis');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Location.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,32 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Ortdetails
+ */
+Ext.define('Lada.view.widget.Location', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.location',
+    displayField: 'bezeichnung',
+    valueField: 'id',
+    emptyText: 'Wählen Sie einen Ort',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('locations');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Locations');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Messeinheit.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Messeinheit
+ */
+Ext.define('Lada.view.widget.Messeinheit', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.messeinheit',
+    store: 'Messeinheiten',
+    displayField: 'einheit',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Messeinheit',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('messeinheiten');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Messeinheiten');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Messgroesse.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Messgroesse
+ */
+Ext.define('Lada.view.widget.Messgroesse', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.messgroesse',
+    store: 'Messgroessen',
+    displayField: 'messgroesse',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Messgröße',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('messgroessen');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Messgroessen');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Messmethode.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Messmethode
+ */
+Ext.define('Lada.view.widget.Messmethode', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.messmethode',
+    store: 'Messmethoden',
+    displayField: 'display',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Messmethode',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: true,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('messmethoden');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Messmethoden');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Messstelle.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Messstelle
+ */
+Ext.define('Lada.view.widget.Messstelle', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.messtelle',
+    store: 'Messstellen',
+    displayField: 'messStelle',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Messstelle',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('messstellen');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Messstellen');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Netzbetreiber.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Netzbetreiber
+ */
+Ext.define('Lada.view.widget.Netzbetreiber', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.netzbetreiber',
+    store: 'StaNetzbetreiber',
+    displayField: 'netzbetreiber',
+    valueField: 'id',
+    emptyText: 'Wählen Sie einen Netzbetreiber',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('netzbetreiber');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Netzbetreiber');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Nwg.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,36 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+var nwgStore = Ext.create('Ext.data.Store', {
+    fields: ['nwgId', 'nwg'],
+    data: [{
+        'nwgId': '',
+        'nwg': '>='
+    }, {
+        'nwgId': '<',
+        'nwg': '<'
+    }]
+});
+
+/**
+ * Combobox for Nachweisgrenze.
+ */
+Ext.define('Lada.view.widget.Nwg', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    editable: false,
+    alias: 'widget.nwg',
+    store: nwgStore,
+    queryMode: 'local',
+    displayField: 'nwg',
+    valueField: 'nwgId',
+    emptyText: 'Messwert kleiner als Nachweisgrenze?',
+
+    initComponent: function() {
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Probenart.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Probenart
+ */
+Ext.define('Lada.view.widget.Probenart', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.probenart',
+    store: 'Probenarten',
+    displayField: 'probenart',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Probenart',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('probenarten');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Probenarten');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Probenzusatzwert.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Zusatzwert
+ */
+Ext.define('Lada.view.widget.Probenzusatzwert', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.probenzusatzwert',
+    store: 'Probenzusaetze',
+    displayField: 'beschreibung',
+    valueField: 'id',
+    emptyText: 'Wählen Sie einen Zusatzwert',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('probenzusaetze');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Probenzusaetze');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Staat.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,33 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Staat
+ */
+Ext.define('Lada.view.widget.Staat', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.staat',
+    store: 'Staaten',
+    displayField: 'staat',
+    valueField: 'id',
+    emptyText: 'Wählen Sie einen Staat',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('staaten');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Staaten');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Status.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,46 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+var statuswerteStore = Ext.create('Ext.data.Store', {
+    fields: ['id', 'status'],
+    data: [{
+        'id': 1,
+        'status': 'nicht vergeben'
+    }, {
+        'id': 2,
+        'status': 'plausibel'
+    }, {
+        'id': 3,
+        'status': 'nicht repräsentativ'
+    }, {
+        'id': 4,
+        'status': 'nicht plausibel'
+    }]
+});
+
+/**
+ * Combobox for Statuswert
+ */
+Ext.define('Lada.view.widget.Status', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.statuswert',
+    store: statuswerteStore,
+    displayField: 'status',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Status',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+
+    initComponent: function() {
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Testdatensatz.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,37 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+var testdatensatzStore = Ext.create('Ext.data.Store', {
+    fields: ['testdatensatzId', 'testdatensatz'],
+    data: [{
+        'testdatensatzId': true,
+        'testdatensatz': 'Ja'
+    }, {
+        'testdatensatzId': false,
+        'testdatensatz': 'Nein'
+    }]
+});
+
+/**
+ * Combobox for Testdatensatz.
+ * This widget is also used a generic "Ja/Nein" combobox.
+ */
+Ext.define('Lada.view.widget.Testdatensatz', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    editable: false,
+    alias: 'widget.testdatensatz',
+    store: testdatensatzStore,
+    queryMode: 'local',
+    displayField: 'testdatensatz',
+    valueField: 'testdatensatzId',
+    emptyText: 'Testdatensatz?',
+
+    initComponent: function() {
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Umwelt.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,49 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Umweltbereich
+ */
+Ext.define('Lada.view.widget.Umwelt' ,{
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.umwelt',
+    store: 'Umwelt',
+    displayField: 'id',
+    valueField: 'id',
+    emptyText: 'Wählen Sie einen Umweltbereich',
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'local',
+    triggerAction: 'all',
+    typeAhead: false,
+    minChars: 0,
+    tpl: '<tpl for="."><div class="x-combo-list-item  x-boundlist-item" >' +
+        '{id} - {umweltBereich}</div></tpl>',
+    // TODO: Set value in disply after selection. Can not figure out why
+    // accessing the recored.data attribute fails here (ti) <2013-08-06 16:52>
+    // listeners: {
+    //     select: function(combo, record, index) {
+    //         console.log("1");
+    //         console.log(record);
+    //         console.log("2");
+    //         var text = record.data['umwId'] +
+    //             " - " + record.data['umweltBereich'];
+    //         console.log("3");
+    //         Ext.form.ComboBox.superclass.setValue.call(this, text);
+    //         combo.value = record.id;
+    //     }
+    // },
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('umwelt');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Umwelt');
+        }
+        this.callParent(arguments);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/Verwaltungseinheit.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,44 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Combobox for Verwaltungseinheit
+ */
+Ext.define('Lada.view.widget.Verwaltungseinheit', {
+    extend: 'Lada.view.widget.base.ComboBox',
+    alias: 'widget.verwaltungseinheiten',
+    store: 'Verwaltungseinheiten',
+    displayField: 'bezeichnung',
+    valueField: 'id',
+    emptyText: 'Wählen Sie eine Verwaltungseinheit',
+    hideTrigger: true,
+    // Enable filtering of comboboxes
+    autoSelect: false,
+    queryMode: 'remote',
+    triggerAction: 'type',
+    typeAhead: false,
+    minChars: 2,
+
+    initComponent: function() {
+        this.store = Ext.data.StoreManager.get('verwaltungseinheiten');
+        if (!this.store) {
+            this.store = Ext.create('Lada.store.Verwaltungseinheiten');
+        }
+        this.callParent(arguments);
+    },
+    // This listener is used to load currently "selected" verwaltungseinheit.
+    // This is needed as without having this record the field would only
+    // display the raw value (id) of the verwaltungseinheit.
+    listeners: {
+        render: function(combo) {
+            combo.store.load({
+                id: this.getValue()
+            });
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/base/ComboBox.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,106 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+Ext.define('Lada.view.widget.base.ComboBox', {
+    extend: 'Ext.form.Panel',
+    alias: 'widget.cbox',
+
+    layout: 'hbox',
+
+    border: 0,
+
+    margin: '0, 0, 5, 0',
+
+    initComponent: function() {
+        this.items = [{
+            xtype: 'combobox',
+            flex: 1,
+            name: this.name,
+            maxLength: this.maxLength,
+            fieldLabel: this.fieldLabel,
+            labelWidth: this.labelWidth,
+            listeners: this.listeners,
+            store: this.store,
+            displayField: this.displayField,
+            valueField: this.valueField,
+            emptyText: this.emptyText,
+            autoSelect: this.autoSelect,
+            queryMode: this.queryMode,
+            triggerAction: this.triggerAction,
+            typeAhead: this.typeAhead,
+            minChars: this.minChars,
+            multiSelect: this.multiSelect,
+            msgTarget: 'none',
+            tpl: this.tpl
+        }, {
+            xtype: 'image',
+            name: 'warnImg',
+            src: 'resources/img/icon-warning.gif',
+            width: 12,
+            height: 12,
+            hidden: true
+        }, {
+            xtype: 'image',
+            name: 'errorImg',
+            src: 'resources/img/icon-error.gif',
+            width: 12,
+            height: 12,
+            hidden: true
+        }];
+        this.callParent(arguments);
+    },
+
+    showWarnings: function(warnings) {
+        var img = this.down('image[name=warnImg]');
+        Ext.create('Ext.tip.ToolTip', {
+            target: img.getEl(),
+            html: warnings
+        });
+        this.down('combobox').invalidCls = 'x-lada-warning';
+        this.down('combobox').markInvalid('');
+        img.show();
+        var fieldset = this.up('fieldset[collapsible=true]');
+        if (fieldset) {
+            fieldset.showWarnings(warnings);
+        }
+    },
+
+    showErrors: function(errors) {
+        var img = this.down('image[name=errorImg]');
+        var warnImg = this.down('image[name=warnImg]');
+        warnImg.hide();
+        Ext.create('Ext.tip.ToolTip', {
+            target: img.getEl(),
+            html: errors
+        });
+        this.down('combobox').invalidCls = 'x-lada-error';
+        this.down('combobox').markInvalid('');
+        img.show();
+        var fieldset = this.up('fieldset[collapsible=true]');
+        if (fieldset) {
+            fieldset.showErrors();
+        }
+    },
+
+    clearWarningOrError: function() {
+        this.down('image[name=errorImg]').hide();
+        this.down('image[name=warnImg]').hide();
+    },
+
+    getValue: function() {
+        return this.down('combobox').getValue();
+    },
+
+    getName: function() {
+        return this.name;
+    },
+
+    setReadOnly: function(value) {
+        this.down('combobox').setReadOnly(value);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/base/Datetime.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,93 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/**
+ * Datetimepicker with german date format.
+ */
+Ext.define('Lada.view.widget.base.Datetime', {
+    extend: 'Ext.panel.Panel',
+    alias: 'widget.datetime',
+    requires: [
+        'Ext.ux.form.DateTimeField'
+    ],
+
+    layout: 'hbox',
+
+    border: 0,
+
+    initComponent: function() {
+        this.margin = this.fieldMargin;
+        var dateField = Ext.create('Ext.ux.form.DateTimeField', {
+            format: 'd.m.Y',
+            emptyText: 'Wählen Sie einen Zeitpunkt',
+            fieldLabel: this.fieldLabel,
+            labelWidth: this.labelWidth,
+            flex: 1,
+            name: this.name,
+            msgTarget: 'none',
+            listeners: this.listeners
+        });
+        this.items = [dateField, {
+            xtype: 'image',
+            name: 'warnImg',
+            src: 'resources/img/icon-warning.gif',
+            width: 12,
+            height: 12,
+            hidden: true
+        }, {
+            xtype: 'image',
+            name: 'errorImg',
+            src: 'resources/img/icon-error.gif',
+            width: 12,
+            height: 12,
+            hidden: true
+        }];
+        this.callParent(arguments);
+    },
+
+    showWarnings: function(warnings) {
+        var img = this.down('image[name=warnImg]');
+        Ext.create('Ext.tip.ToolTip', {
+            target: img.getEl(),
+            html: warnings
+        });
+        this.down('datetimefield').invalidCls = 'x-lada-warning';
+        this.down('datetimefield').markInvalid('');
+        img.show();
+        var fieldset = this.up('fieldset[collapsible=true]');
+        if (fieldset) {
+            fieldset.showWarnings(warnings);
+        }
+    },
+
+    showErrors: function(errors) {
+        var img = this.down('image[name=errorImg]');
+        var warnImg = this.down('image[name=warnImg]');
+        warnImg.hide();
+        Ext.create('Ext.tip.ToolTip', {
+            target: img.getEl(),
+            html: errors
+        });
+        this.down('datetimefield').invalidCls = 'x-lada-error';
+        this.down('datetimefield').markInvalid('');
+        img.show();
+        var fieldset = this.up('fieldset[collapsible=true]');
+        if (fieldset) {
+            fieldset.showErrors();
+        }
+    },
+
+    clearWarningOrError: function() {
+        this.down('image[name=errorImg]').hide();
+        this.down('image[name=warnImg]').hide();
+    },
+
+    setReadOnly: function(value) {
+        this.down('datetimefield').setReadOnly(value);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/base/FieldSet.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,67 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+Ext.define('Lada.view.widget.base.FieldSet', {
+    extend: 'Ext.form.FieldSet',
+    alias: 'widget.fset',
+
+    plainTitle: '',
+    origColor: '',
+
+    showWarningOrError: function(warning, warningText, error, errorText) {
+        var ndx = 0;
+        if (this.collapsible === true) {
+            ndx = 1;
+        }
+        this.plainTitle = this.getEl().dom.firstChild
+            .firstChild.firstChild
+            .children[ndx].innerHTML;
+        this.origColor = this.getEl().dom.style['border-color'];
+        if (error) {
+            this.getEl().dom.style['border-color'] = '#FF0000';
+            this.getEl().dom.firstChild.firstChild.firstChild
+                .children[ndx].innerHTML =
+                    '<img src="resources/img/icon-error.gif" width="12" height="12" />  ' +
+                    this.plainTitle;
+            if (errorText) {
+                Ext.create('Ext.tip.ToolTip', {
+                    target: this.getEl().dom.firstChild.firstChild.firstChild.children[ndx],
+                    html: errorText
+                });
+            }
+            return;
+        }
+        if (warning) {
+            this.getEl().dom.style['border-color'] = '#FFE25D';
+            this.getEl().dom.firstChild.firstChild.firstChild
+                .children[ndx].innerHTML =
+                    '<img src="resources/img/icon-warning.gif" width="12" height="12" />  ' +
+                    this.plainTitle;
+            if (warningText) {
+                Ext.create('Ext.tip.ToolTip', {
+                    target: this.getEl().dom.firstChild.firstChild.firstChild.children[ndx],
+                    html: warningText
+                });
+            }
+            return;
+        }
+    },
+
+    clearMessages: function() {
+        var ndx = 0;
+        if (this.collapsible === true) {
+            ndx = 1;
+        }
+        if (this.plainTitle !== '') {
+            this.getEl().dom.firstChild
+                .firstChild.firstChild
+                .children[ndx].innerHTML = this.plainTitle;
+            this.getEl().dom.style['border-color'] = this.origColor;
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/widget/base/TextField.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,85 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+Ext.define('Lada.view.widget.base.TextField', {
+    extend: 'Ext.panel.Panel',
+    alias: 'widget.tfield',
+
+    layout: 'hbox',
+
+    border: 0,
+
+    initComponent: function() {
+        this.items = [{
+            xtype: 'textfield',
+            flex: 1,
+            name: this.name,
+            msgTarget: 'none',
+            maxLength: this.maxLength,
+            fieldLabel: this.fieldLabel,
+            labelWidth: this.labelWidth,
+            listeners: this.listeners
+        }, {
+            xtype: 'image',
+            name: 'warnImg',
+            src: 'resources/img/icon-warning.gif',
+            width: 12,
+            height: 12,
+            hidden: true
+        }, {
+            xtype: 'image',
+            name: 'errorImg',
+            src: 'resources/img/icon-error.gif',
+            width: 12,
+            height: 12,
+            hidden: true
+        }];
+        this.callParent(arguments);
+    },
+
+    showWarnings: function(warnings) {
+        var img = this.down('image[name=warnImg]');
+        Ext.create('Ext.tip.ToolTip', {
+            target: img.getEl(),
+            html: warnings
+        });
+        img.show();
+        this.down('textfield').invalidCls = 'x-lada-warning';
+        this.down('textfield').markInvalid('');
+        var fieldset = this.up('fieldset[collapsible=true]');
+        if (fieldset) {
+            fieldset.showWarnings(warnings);
+        }
+    },
+
+    showErrors: function(errors) {
+        var img = this.down('image[name=errorImg]');
+        var warnImg = this.down('image[name=warnImg]');
+        warnImg.hide();
+        Ext.create('Ext.tip.ToolTip', {
+            target: img.getEl(),
+            html: errors
+        });
+        this.down('textfield').invalidCls = 'x-lada-error';
+        this.down('textfield').markInvalid('');
+        img.show();
+        var fieldset = this.up('fieldset[collapsible=true]');
+        if (fieldset) {
+            fieldset.showErrors();
+        }
+    },
+
+    clearWarningOrError: function() {
+        this.down('image[name=errorImg]').hide();
+        this.down('image[name=warnImg]').hide();
+    },
+
+    setReadOnly: function(value) {
+        this.down('textfield').setReadOnly(value);
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/view/window/ProbeEdit.js	Fri Mar 06 12:43:52 2015 +0100
@@ -0,0 +1,155 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+
+/*
+ * Window to edit a Probe
+ */
+Ext.define('Lada.view.window.ProbeEdit', {
+    extend: 'Ext.window.Window',
+    alias: 'widget.probenedit',
+
+    requires: [
+        'Lada.view.form.Probe',
+        'Lada.view.grid.Ort',
+        'Lada.view.grid.Probenzusatzwert',
+        'Lada.view.grid.PKommentar'
+    ],
+
+    collapsible: true,
+    maximizable: true,
+    autoShow: true,
+    autoScroll: true,
+    layout: 'fit',
+
+    record: null,
+
+    initComponent: function() {
+        if (this.record === null) {
+            Ext.Msg.alert('Keine valide Probe ausgewählt!');
+            this.callParent(arguments);
+            return;
+        }
+        this.title = '§3-Probe ' + this.record.get('probeId');
+        this.buttons = [{
+            text: 'Schließen',
+            scope: this,
+            handler: this.close
+        }];
+        this.width = 700;
+        this.height = Ext.getBody().getViewSize().height - 30;
+        // InitialConfig is the config object passed to the constructor on
+        // creation of this window. We need to pass it throuh to the form as
+        // we need the "modelId" param to load the correct item.
+
+        this.items = [{
+            border: 0,
+            autoScroll: true,
+            items: [{
+                xtype: 'probeform',
+                recordId: this.record.get('id')
+            }, {
+                xtype: 'fset',
+                name: 'orte',
+                title: 'Ortsangaben',
+                padding: '5, 5',
+                margin: 5,
+                items: [{
+                    xtype: 'ortgrid',
+                    recordId: this.record.get('id')
+                }]
+            }, {
+                xtype: 'fset',
+                name: 'probenzusaetzwerte',
+                title: 'Zusatzwerte',
+                padding: '5, 5',
+                margin: 5,
+                collapsible: true,
+                collapsed: true,
+                items: [{
+                    xtype: 'probenzusatzwertgrid',
+                    recordId: this.record.get('id')
+                }]
+            }, {
+                xtype: 'fset',
+                name: 'pkommentare',
+                title: 'Kommentare',
+                padding: '5, 5',
+                margin: 5,
+                collapsible: true,
+                collapsed: true,
+                items: [{
+                    xtype: 'pkommentargrid',
+                    recordId: this.record.get('id')
+                }]
+            }]
+        }];
+        this.callParent(arguments);
+    },
+
+    initData: function() {
+        this.clearMessages();
+        Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), {
+            failure: function(record, action) {
+                // TODO
+            },
+            success: function(record, response) {
+                this.down('probeform').setRecord(record);
+                var json = Ext.decode(response.response.responseText);
+                if (json) {
+                    this.setMessages(json.errors, json.warnings);
+                }
+            },
+            scope: this
+        });
+    },
+
+    setMessages: function(errors, warnings) {
+        this.down('probeform').setMessages(errors, warnings);
+        var errorOrtText = '';
+        var errorOrt = false;
+        var warningOrtText = '';
+        var warningOrt = false;
+        var key;
+        var content;
+        var i;
+        var keyText;
+        var i18n = Lada.getApplication().bundle;
+        for (key in errors) {
+            if (key && key.contains('Ort')) {
+                errorOrt = true;
+                content = errors[key];
+                keyText = key[0].toUpperCase();
+                for (i = 0; i < content.length; i++) {
+                    errorOrtText += keyText + ': ' +
+                        i18n.getMsg(content[i].toString()) + '\n';
+                }
+            }
+        }
+        for (key in warnings) {
+            if (key && key.contains('Ort')) {
+                warningOrt = true;
+                content = warnings[key];
+                keyText = key[0].toUpperCase();
+                for (i = 0; i < content.length; i++) {
+                    warningOrtText += keyText + ': ' +
+                        i18n.getMsg(content[i].toString()) + '\n';
+                }
+            }
+        }
+        this.down('fset[name=orte]').showWarningOrError(
+            warningOrt,
+            warningOrtText === '' ? null : warningOrtText,
+            errorOrt,
+            errorOrtText === '' ? null : errorOrtText);
+    },
+
+    clearMessages: function() {
+        this.down('probeform').clearMessages();
+        this.down('fset[name=orte]').clearMessages();
+    }
+});

http://lada.wald.intevation.org