public class Prefetch
extends de.agilecoders.wicket.jquery.AbstractConfig
Configuration for Twitter Typeahead’s prefetch setting.
| Constructor and Description |
|---|
Prefetch() |
| Modifier and Type | Method and Description |
|---|---|
Prefetch |
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.
|
Prefetch |
withTtl(long ttl)
The time (in milliseconds) the prefetched data should be cached in localStorage.
|
Prefetch |
withUrl(CharSequence url)
A URL to a JSON file containing an array of datums.
|
public Prefetch withUrl(CharSequence url)
A URL to a JSON file containing an array of datums. Required.
url - mandatory parameterpublic Prefetch withTtl(long ttl)
The time (in milliseconds) the prefetched data should be cached in localStorage. Defaults to 86400000 (1 day).
ttl - the time (in milliseconds) the prefetched data should be cached in localStorage.public Prefetch 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 - A function with the signature filter(parsedResponse) that transforms the response body into an array of datumsCopyright © 2011–2014 AgileCoders. All rights reserved.