public abstract class SuggestOracle
extends java.lang.Object
SuggestOracle
can be used to create
suggestions associated with a specific query string. It is currently used by
SuggestBox
.SuggestBox
Modifier and Type | Class and Description |
---|---|
static interface |
SuggestOracle.Callback
Callback for
SuggestOracle . |
static class |
SuggestOracle.Request
A
SuggestOracle request. |
static class |
SuggestOracle.Response
SuggestOracle response. |
static interface |
SuggestOracle.Suggestion
Suggestion supplied by the
SuggestOracle . |
Constructor and Description |
---|
SuggestOracle()
Constructor for
SuggestOracle . |
Modifier and Type | Method and Description |
---|---|
boolean |
isDisplayStringHTML()
Should
SuggestOracle.Suggestion display strings be treated as HTML? If true, this
all suggestions' display strings will be interpreted as HTML, otherwise as
text. |
void |
requestDefaultSuggestions(SuggestOracle.Request request,
SuggestOracle.Callback callback)
Generate a
SuggestOracle.Response based on a default request. |
abstract void |
requestSuggestions(SuggestOracle.Request request,
SuggestOracle.Callback callback)
Generate a
SuggestOracle.Response based on a specific SuggestOracle.Request . |
public SuggestOracle()
SuggestOracle
.public boolean isDisplayStringHTML()
SuggestOracle.Suggestion
display strings be treated as HTML? If true, this
all suggestions' display strings will be interpreted as HTML, otherwise as
text.public void requestDefaultSuggestions(SuggestOracle.Request request, SuggestOracle.Callback callback)
SuggestOracle.Response
based on a default request. The request query
must be null as it represents the results the oracle should return based on
no query string.
After the SuggestOracle.Response
is created, it is passed into
SuggestOracle.Callback.onSuggestionsReady(com.google.gwt.user.client.ui.SuggestOracle.Request, com.google.gwt.user.client.ui.SuggestOracle.Response)
.
request
- the requestcallback
- the callback to use for the responsepublic abstract void requestSuggestions(SuggestOracle.Request request, SuggestOracle.Callback callback)
SuggestOracle.Response
based on a specific SuggestOracle.Request
. After the
SuggestOracle.Response
is created, it is passed into
SuggestOracle.Callback.onSuggestionsReady(com.google.gwt.user.client.ui.SuggestOracle.Request, com.google.gwt.user.client.ui.SuggestOracle.Response)
.request
- the requestcallback
- the callback to use for the response