The goog.ui.ac.RemoteArrayMatcher Class

goog.ui.ac.RemoteArrayMatcher
> goog.Disposable

goog.ui.ac.RemoteArrayMatcher(url, opt_noSimilar)

An array matcher that requests matches via ajax.

url {string}
The Uri which generates the auto complete matches. The search term is passed to the server as the 'token' query param.
opt_noSimilar {boolean=}
If true, request that the server does not do similarity matches for the input token against the dictionary. The value is sent to the server as the 'use_similar' query param which is either "1" (opt_noSimilar==false) or "0" (opt_noSimilar==true).

.addOnDisposeCallback(callback, opt_scope)

Inherited from goog.Disposable .

Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.

callback {!Function}
The callback function.
opt_scope {Object=}
An optional scope to call the callback in.

.creationStack {string}

Inherited from goog.Disposable .

If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.

.dispose()

Inherited from goog.Disposable .

Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.

returns {void}
Nothing.

.isDisposed()

Inherited from goog.Disposable .

returns {boolean}
Whether the object has been disposed of.

.registerDisposable(disposable)

Inherited from goog.Disposable .

Associates a disposable object with this object so that they will be disposed together.

disposable {goog.disposable.IDisposable}
that will be disposed when this object is disposed.

.requestMatchingRows(token, maxMatches, matchHandler, opt_fullString)

Retrieve a set of matching rows from the server via ajax.

token {string}
The text that should be matched; passed to the server as the 'token' query param.
maxMatches {number}
The maximum number of matches requested from the server; passed as the 'max_matches' query param. The server is responsible for limiting the number of matches that are returned.
matchHandler {Function}
Callback to execute on the result after matching.
opt_fullString {string=}
The full string from the input box.

.setContent(content)

Set the post data.

content {string}
Post data.

.setHeaders(headers)

Set the HTTP headers.

headers {Object|goog.structs.Map}
Map of headers to add to the request.

.setMethod(method)

Set the send method ("GET", "POST").

method {string}
The send method; default: GET.

.setTimeoutInterval(interval)

Set the timeout interval.

interval {number}
Number of milliseconds after which an incomplete request will be aborted; 0 means no timeout is set.

.xhrCallback(token, matchHandler, event)

Handles the XHR response.

token {string}
The XHR autocomplete token.
matchHandler {Function}
The AutoComplete match handler.
event {goog.events.Event}
The XHR success event.