public class Remote
extends de.agilecoders.wicket.jquery.AbstractConfig
Configuration for Twitter Typeahead’s remote setting.
| Modifier and Type | Class and Description |
|---|---|
static class |
Remote.RateLimit |
| Modifier and Type | Field and Description |
|---|---|
protected static de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> |
BeforeSend |
protected static de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> |
Filter |
protected static de.agilecoders.wicket.jquery.IKey<Integer> |
MaxParallelRequests |
protected static de.agilecoders.wicket.jquery.IKey<String> |
RateLimit |
protected static de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> |
Replace |
protected static de.agilecoders.wicket.jquery.IKey<CharSequence> |
Url |
protected static de.agilecoders.wicket.jquery.IKey<String> |
Wildcard |
| Constructor and Description |
|---|
Remote() |
| Modifier and Type | Method and Description |
|---|---|
Remote |
withBeforeSend(de.agilecoders.wicket.jquery.util.Json.RawValue beforeSend)
A pre-request callback with the signature beforeSend(jqXhr, settings).
|
Remote |
withFilter(de.agilecoders.wicket.jquery.util.Json.RawValue filter)
A function with the signature filter(parsedResponse) that transforms the response body into an array of datums.
|
Remote |
withMaxParallelRequests(int maxParallelRequests)
The max number of parallel requests typeahead.js can have pending.
|
Remote |
withRateLimit(Remote.RateLimit rateLimit)
A URL to make requests to when when the data provided by local and prefetch is insufficient.
|
Remote |
withReplace(de.agilecoders.wicket.jquery.util.Json.RawValue replace)
A function with the signature replace(url, uriEncodedQuery) that can be used to override the request URL.
|
Remote |
withUrl(CharSequence url)
A URL to make requests to when when the data provided by local and prefetch is insufficient.
|
Remote |
withWildcard(String wildcard)
A URL to make requests to when when the data provided by local and prefetch is insufficient.
|
protected static final de.agilecoders.wicket.jquery.IKey<CharSequence> Url
protected static final de.agilecoders.wicket.jquery.IKey<String> Wildcard
protected static final de.agilecoders.wicket.jquery.IKey<String> RateLimit
protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> Filter
protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> BeforeSend
protected static final de.agilecoders.wicket.jquery.IKey<Integer> MaxParallelRequests
protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> Replace
public Remote withUrl(CharSequence url)
A URL to make requests to when when the data provided by local and prefetch is insufficient. This setting is always set by Typeahead component.
url - mandatory parameterpublic Remote withWildcard(String wildcard)
A URL to make requests to when when the data provided by local and prefetch is insufficient.
wildcard - mandatory parameterpublic Remote withRateLimit(Remote.RateLimit rateLimit)
A URL to make requests to when when the data provided by local and prefetch is insufficient.
rateLimit - mandatory parameterpublic Remote withFilter(de.agilecoders.wicket.jquery.util.Json.RawValue filter)
A function with the signature filter(parsedResponse) that transforms the response body into an array of datums. Expected to return an array of datums.
filter - mandatory parameterpublic Remote withBeforeSend(de.agilecoders.wicket.jquery.util.Json.RawValue beforeSend)
A pre-request callback with the signature beforeSend(jqXhr, settings). Can be used to set custom headers. See the jQuery.ajax docs for more info.
beforeSend - A pre-request callback that can be used to set custom headerspublic Remote withMaxParallelRequests(int maxParallelRequests)
The max number of parallel requests typeahead.js can have pending. Defaults to 6.
maxParallelRequests - The max number of parallel requests typeahead.js can have pendingpublic Remote withReplace(de.agilecoders.wicket.jquery.util.Json.RawValue replace)
A function with the signature replace(url, uriEncodedQuery) that can be used to override the request URL. Expected to return a valid URL. If set, no wildcard substitution will be performed on url.
replace - A function that can be used to override the request URL.Copyright © 2011–2014 AgileCoders. All rights reserved.