Module wicket.bootstrap.extensions
Class Remote
java.lang.Object
de.agilecoders.wicket.jquery.CombinableConfig
de.agilecoders.wicket.jquery.AbstractConfig
de.agilecoders.wicket.extensions.markup.html.bootstrap.form.typeahead.Remote
- All Implemented Interfaces:
de.agilecoders.wicket.jquery.Config,Serializable,IClusterable
public class Remote
extends de.agilecoders.wicket.jquery.AbstractConfig
Configuration for Twitter Typeahead's
remote setting.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue>protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue>protected static final de.agilecoders.wicket.jquery.IKey<Integer>protected static final de.agilecoders.wicket.jquery.IKey<String>protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue>protected static final de.agilecoders.wicket.jquery.IKey<CharSequence>protected static final de.agilecoders.wicket.jquery.IKey<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithBeforeSend(de.agilecoders.wicket.jquery.util.Json.RawValue beforeSend) A pre-request callback with the signature beforeSend(jqXhr, settings).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.withMaxParallelRequests(int maxParallelRequests) The max number of parallel requests typeahead.js can have pending.withRateLimit(Remote.RateLimit rateLimit) A URL to make requests to when when the data provided by local and prefetch is insufficient.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.withUrl(CharSequence url) A URL to make requests to when when the data provided by local and prefetch is insufficient.withWildcard(String wildcard) A URL to make requests to when when the data provided by local and prefetch is insufficient.Methods inherited from class de.agilecoders.wicket.jquery.AbstractConfig
all, contains, get, getString, isEmpty, newKey, put, remove, toJsonString, wrapMethods inherited from class de.agilecoders.wicket.jquery.CombinableConfig
combine, withFallback
-
Field Details
-
Url
-
Wildcard
-
RateLimit
-
Filter
protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> Filter -
BeforeSend
protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> BeforeSend -
MaxParallelRequests
-
Replace
protected static final de.agilecoders.wicket.jquery.IKey<de.agilecoders.wicket.jquery.util.Json.RawValue> Replace
-
-
Constructor Details
-
Remote
public Remote()
-
-
Method Details
-
withUrl
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.- Parameters:
url- mandatory parameter- Returns:
- this instance for chaining
-
withWildcard
A URL to make requests to when when the data provided by local and prefetch is insufficient.- Parameters:
wildcard- mandatory parameter- Returns:
- this instance for chaining
-
withRateLimit
A URL to make requests to when when the data provided by local and prefetch is insufficient.- Parameters:
rateLimit- mandatory parameter- Returns:
- this instance for chaining
-
withFilter
A function with the signature filter(parsedResponse) that transforms the response body into an array of datums. Expected to return an array of datums.- Parameters:
filter- mandatory parameter- Returns:
- this instance for chaining
-
withBeforeSend
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.- Parameters:
beforeSend- A pre-request callback that can be used to set custom headers- Returns:
- this instance for chaining
-
withMaxParallelRequests
The max number of parallel requests typeahead.js can have pending. Defaults to 6.- Parameters:
maxParallelRequests- The max number of parallel requests typeahead.js can have pending- Returns:
- this instance for chaining
-
withReplace
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.- Parameters:
replace- A function that can be used to override the request URL.- Returns:
- this instance for chaining
-