GWT 2.7.0

com.google.gwt.user.client.ui
Class SuggestOracle

java.lang.Object
  extended by com.google.gwt.user.client.ui.SuggestOracle
Direct Known Subclasses:
MultiWordSuggestOracle

public abstract class SuggestOracle
extends java.lang.Object

A SuggestOracle can be used to create suggestions associated with a specific query string. It is currently used by SuggestBox.

See Also:
SuggestBox

Nested Class Summary
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 Summary
SuggestOracle()
          Constructor for SuggestOracle.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuggestOracle

public SuggestOracle()
Constructor for SuggestOracle.

Method Detail

isDisplayStringHTML

public 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.

Returns:
by default, returns false

requestDefaultSuggestions

public void requestDefaultSuggestions(SuggestOracle.Request request,
                                      SuggestOracle.Callback callback)
Generate a 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) .

Parameters:
request - the request
callback - the callback to use for the response

requestSuggestions

public abstract void requestSuggestions(SuggestOracle.Request request,
                                        SuggestOracle.Callback callback)
Generate a 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).

Parameters:
request - the request
callback - the callback to use for the response

GWT 2.7.0