changeset 428:651ee49ff3c2

Added listener to load the recored of the set Verwaltungseinheit.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 08 Nov 2013 12:36:29 +0100 (2013-11-08)
parents 7d80feaa4a7f
children 608a1784a8ac
files app/view/widgets/Verwaltungseinheit.js
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/widgets/Verwaltungseinheit.js	Fri Nov 08 12:34:37 2013 +0100
+++ b/app/view/widgets/Verwaltungseinheit.js	Fri Nov 08 12:36:29 2013 +0100
@@ -17,5 +17,15 @@
         minChars: 2,
     initComponent: function() {
         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, eOpts) {
+            combo.store.load({
+                id: this.getValue()
+            });
+        }
     }
 });

http://lada.wald.intevation.org