Mercurial > lada > lada-client
diff app/view/grid/Status.js @ 961:6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 10 Nov 2015 13:07:57 +0100 |
parents | 5d57c6c53e20 |
children | 6a6f2c6fe8ee |
line wrap: on
line diff
--- a/app/view/grid/Status.js Tue Nov 10 12:16:19 2015 +0100 +++ b/app/view/grid/Status.js Tue Nov 10 13:07:57 2015 +0100 @@ -47,9 +47,17 @@ this.plugins = [this.rowEditing]; var statusWerteStore = Ext.create('Lada.store.StatusWerte'); - statusWerteStore.load(); //add params messungid + statusWerteStore.load({ + //params: { + // messungsId: this.recordId + //} + }); var statusStufeStore = Ext.create('Lada.store.StatusStufe'); - statusStufeStore.load(); //add params messungid + statusStufeStore.load({ + //params: { + // messungsId: this.recordId + //} + }); this.dockedItems = [{ xtype: 'toolbar', dock: 'bottom', @@ -76,11 +84,16 @@ header: 'Erzeuger', dataIndex: 'erzeuger', renderer: function(value) { + var r = ''; if (!value || value === '') { - return ''; + r = 'Error'; } var mstore = Ext.data.StoreManager.get('messstellen'); - return mstore.getById(value).get('messStelle'); + var item = mstore.getById(value); + if (item) { + r = item.get('messStelle'); + } + return r; }, editor: { xtype: 'combobox', @@ -105,14 +118,6 @@ } return r; }, - editor: { - xtype: 'combobox', - store: statusStufeStore, - displayField: 'stufe', - valueField: 'id', - allowBlank: false, - editable: false - }, sortable: false, }, { header: 'Status',