]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/event/CommandsManager.js
Fix various problems with focus management
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / argeo-ria-src / class / org / argeo / ria / event / CommandsManager.js
index 6452a3a87f313761fed6a9bf8670ef52ff2b5f6e..324a13cdf36afa2fb2749046291756e05bbf077a 100644 (file)
@@ -185,6 +185,7 @@ qx.Class.define("org.argeo.ria.event.CommandsManager",
                        if(!definition.selectionChange) continue;\r
                        if(shared[key]){\r
                                var currentFocus = org.argeo.ria.components.ViewsManager.getInstance().getCurrentFocus();\r
+                               //this.debug(currentFocus);\r
                                if(!currentFocus) continue;\r
                                var sharedComm = shared[key][currentFocus.getViewId()];\r
                                if(sharedComm && sharedComm.selectionChange){\r
@@ -409,6 +410,8 @@ qx.Class.define("org.argeo.ria.event.CommandsManager",
                                }\r
                                var currentFocus = org.argeo.ria.components.ViewsManager.getInstance().getCurrentFocus();\r
                                if(currentFocus && currentFocus.getViewId() && callbacks[currentFocus.getViewId()]){\r
+                                       var currentViewId = currentFocus.getViewId();\r
+                                       view = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById(currentViewId).getContent();\r
                                        var binded = qx.lang.Function.bind(callbacks[currentFocus.getViewId()], view);\r
                                        binded(event);\r
                                        return;\r