From c0b76be62fda2c379c5a5b2e682de2929d0ba7dd Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Mon, 9 Apr 2007 12:06:42 +0000 Subject: r22136: Fix incorrect event handling. Submitted by John Jorgensen rafal (This used to be commit f12a7f223dbd6e744df85308098a093b4e48cadb) --- webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js | 10 ++++++++-- webapps/swat/source/class/swat/module/ldbbrowse/Gui.js | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'webapps') diff --git a/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js b/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js index eb31fa9c8a..02aada9ebf 100644 --- a/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js +++ b/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js @@ -61,7 +61,7 @@ qx.Proto.buildFsm = function(module) { // Yup. Re-open the database var dbName = fsm.getObject("dbName"); - dbName.dispatchEvent(new qx.event.type.Event("changeSelection"), + dbName.dispatchEvent(new qx.event.type.Event("changeSelected"), true); } else @@ -104,8 +104,14 @@ qx.Proto.buildFsm = function(module) "changeSelection": { "tree" : - "Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed", + "Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed" + }, + + // If another database is selected, try to open it and refresh + // the tree + "changeSelected": + { "dbName": "Transition_Idle_to_AwaitRpcResult_via_db_changed" } diff --git a/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js b/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js index d341563164..9b1372a044 100644 --- a/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js +++ b/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js @@ -52,9 +52,9 @@ qx.Proto.buildGui = function(module) // Add our global database name (the only option, for now) var item = new qx.ui.form.ListItem(module.dbFile); o.add(item); - + // We want to be notified if the selection changes - o.addEventListener("changeSelection", fsm.eventListener, fsm); + o.addEventListener("changeSelected", fsm.eventListener, fsm); // Save the database name object so we can react to changes fsm.addObject("dbName", o); -- cgit