Fix for Issue 32. Paste option should not be available after Paste Command is execute...
[pithos] / src / gr / ebs / gss / client / PermissionsAddDialog.java
index 3f14451..4cef442 100644 (file)
@@ -114,6 +114,10 @@ public class PermissionsAddDialog extends DialogBox {
                                                        keyCode == KeyCodes.KEY_LEFT ||
                                                        keyCode == KeyCodes.KEY_RIGHT)
                                                return;
+                                       if (keyCode==KeyCodes.KEY_ESCAPE) {
+                                               suggestBox.hideSuggestionList();
+                                               return;
+                                       }
                                        String text = suggestBox.getText().trim();
                                        // Avoid useless queries for keystrokes that do not modify
                                        // the text.
@@ -236,7 +240,7 @@ public class PermissionsAddDialog extends DialogBox {
                GWT.log("Searching for " + query, null);
 
                GetCommand<UserSearchResource> eg = new GetCommand<UserSearchResource>(UserSearchResource.class,
-                                       app.getApiPath() + "users/" + URL.encodeComponent(query), false) {
+                                       app.getApiPath() + "users/" + URL.encodeComponent(query), false, null) {
 
                        @Override
                        public void onComplete() {