Pman.Tab.XtupleCurrency.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 23 Dec 2013 10:42:44 +0000 (18:42 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 23 Dec 2013 10:42:44 +0000 (18:42 +0800)
Pman.Tab.XtupleCurrency.js

Pman.Tab.XtupleCurrency.bjs
Pman.Tab.XtupleCurrency.js

index 0c1534b..2f29616 100644 (file)
                                     "|xns": "Roo.grid",
                                     "items": [
                                         {
+                                            "listeners": {
+                                                "beforeload": "function (_self, options)\n{\n    var s = _this.grid.selModel.getSelected();\n    if (!s) { \n        this.removeAll();\n        return false;\n    }\n    options.parms.curr_id = s.data.curr_id;\n}"
+                                            },
                                             "*prop": "dataSource",
-                                            "xtype": "Store",
                                             "remoteSort": true,
+                                            "xtype": "Store",
                                             "|sortInfo": "{ field : '', direction: 'ASC' }",
                                             "|xns": "Roo.data",
                                             "items": [
index b263487..72403b9 100644 (file)
@@ -217,6 +217,17 @@ Pman.Tab.XtupleCurrency = new Roo.XComponent({
                             dataSource : {
                                 xtype: 'Store',
                                 xns: Roo.data,
+                                listeners : {
+                                    beforeload : function (_self, options)
+                                    {
+                                        var s = _this.grid.selModel.getSelected();
+                                        if (!s) { 
+                                            this.removeAll();
+                                            return false;
+                                        }
+                                        options.parms.curr_id = s.data.curr_id;
+                                    }
+                                },
                                 remoteSort : true,
                                 sortInfo : { field : '', direction: 'ASC' },
                                 proxy : {