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.
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() {
- DisplayHelper.hideSuggestions(suggestBox);
+ suggestBox.hideSuggestionList();
oracle.clear();
UserSearchResource s = getResult();
for (UserResource user : s.getUsers()) {
GWT.log("Found " + user.getUsername(), null);
oracle.add(user.getUsername());
}
- DisplayHelper.showSuggestions(suggestBox, selectedUser);
+ suggestBox.showSuggestionList();
}
@Override