goog.ui.ac.RemoteArrayMatcher
Classgoog.ui.ac.RemoteArrayMatcher
> goog.Disposable
goog.ui.ac.RemoteArrayMatcher(url, opt_noSimilar)
An array matcher that requests matches via ajax.
url
{string
}
opt_noSimilar
{boolean
=}
.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
}
opt_scope
{Object
=}
.buildUrl(uri, token, maxMatches, useSimilar, opt_fullString)
[protected]Builds a complete GET-style URL, given the base URI and autocomplete related parameter values. Override this to build any customized lookup URLs. Can be used to change request method and any post content as well.
uri
{string
}
token
{string
}
maxMatches
{number
}
useSimilar
{boolean
}
opt_fullString
{string
=}
string
}
.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.
void
}
.disposeInternal()
[protected]Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example:
mypackage.MyClass = function() { goog.base(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { goog.base(this, 'disposeInternal'); // Dispose logic specific to MyClass. ... };
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.parseResponseText(responseText)
[protected]Parses and retrieves the array of suggestions from XHR response. Override this if the response is not a simple JSON array.
responseText
{string
}
Array
.<string
>}
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.requestMatchingRows(token, maxMatches, matchHandler, opt_fullString)
Retrieve a set of matching rows from the server via ajax.
token
{string
}
maxMatches
{number
}
matchHandler
{Function
}
opt_fullString
{string
=}
.setContent(content)
Set the post data.
content
{string
}
.setHeaders(headers)
Set the HTTP headers.
headers
{Object
|goog.structs.Map
}
.setMethod(method)
Set the send method ("GET", "POST").
method
{string
}
.setTimeoutInterval(interval)
Set the timeout interval.
interval
{number
}
.shouldRequestMatches(uri, token, maxMatches, useSimilar, opt_fullString)
[protected]Returns whether the suggestions should be updated? Override this to prevent updates eg - when token is empty.
uri
{string
}
token
{string
}
maxMatches
{number
}
useSimilar
{boolean
}
opt_fullString
{string
=}
boolean
}
.xhrCallback(token, matchHandler, event)
Handles the XHR response.
token
{string
}
matchHandler
{Function
}
event
{goog.events.Event
}