r22136: Fix incorrect event handling.
authorRafal Szczesniak <mimir@samba.org>
Mon, 9 Apr 2007 12:06:42 +0000 (12:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:49:54 +0000 (14:49 -0500)
Submitted by John Jorgensen <jorgensen.john@gmail.com>

rafal
(This used to be commit f12a7f223dbd6e744df85308098a093b4e48cadb)

webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js
webapps/swat/source/class/swat/module/ldbbrowse/Gui.js

index eb31fa9c8acfd128f58c2841413f57050a13ae21..02aada9ebf8c2d26ac43aafa59b5c41d3dd7f040 100644 (file)
@@ -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"
           }
index d341563164d978bf773d92a6b963d6bbd31b3fd9..9b1372a044a89586dcc370c0a502cb5b6c041537 100644 (file)
@@ -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);