Revision: 8859
Author: [email protected]
Date: Thu Sep 23 17:42:20 2010
Log: Passing Suggestion truncation info where SuggestionDisplay subclasses
can get at it.
Review at http://gwt-code-reviews.appspot.com/918801
Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=8859
Modified:
/trunk/user/src/com/google/gwt/user/client/ui/SuggestBox.java
=======================================
--- /trunk/user/src/com/google/gwt/user/client/ui/SuggestBox.java Tue Sep
21 07:53:19 2010
+++ /trunk/user/src/com/google/gwt/user/client/ui/SuggestBox.java Thu Sep
23 14:30:55 2010
@@ -154,6 +154,19 @@
*/
protected void onEnsureDebugId(String suggestBoxBaseID) {
}
+
+ /**
+ * Accepts information about whether there were more suggestions
matching
+ * than were provided to {...@link #showSuggestions}.
+ *
+ * @param hasMoreSuggestions true if more matches were available
+ * @param numMoreSuggestions number of more matches available. If the
+ * specific number is unknown, 0 will be passed.
+ */
+ protected void setMoreSuggestions(boolean hasMoreSuggestions,
+ int numMoreSuggestions) {
+ // Subclasses may optionally implement.
+ }
/**
* Update the list of visible suggestions.
@@ -651,6 +664,8 @@
display.showSuggestions(SuggestBox.this, response.getSuggestions(),
oracle.isDisplayStringHTML(), isAutoSelectEnabled(),
suggestionCallback);
+ display.setMoreSuggestions(response.hasMoreSuggestions(),
+ response.getMoreSuggestionsCount());
}
};
private final SuggestionCallback suggestionCallback = new
SuggestionCallback() {
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors