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
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    withBeforeSend(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.
    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.
    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, wrap

    Methods inherited from class de.agilecoders.wicket.jquery.CombinableConfig

    combine, withFallback

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • Url

      protected static final de.agilecoders.wicket.jquery.IKey<CharSequence> Url
    • Wildcard

      protected static final de.agilecoders.wicket.jquery.IKey<String> Wildcard
    • RateLimit

      protected static final de.agilecoders.wicket.jquery.IKey<String> 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

      protected static final de.agilecoders.wicket.jquery.IKey<Integer> 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

      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.
      Parameters:
      url - mandatory parameter
      Returns:
      this instance for chaining
    • withWildcard

      public Remote withWildcard(String wildcard)
      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

      public Remote withRateLimit(Remote.RateLimit rateLimit)
      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

      public 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.
      Parameters:
      filter - mandatory parameter
      Returns:
      this instance for chaining
    • withBeforeSend

      public 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.
      Parameters:
      beforeSend - A pre-request callback that can be used to set custom headers
      Returns:
      this instance for chaining
    • withMaxParallelRequests

      public Remote withMaxParallelRequests(int maxParallelRequests)
      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

      public 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.
      Parameters:
      replace - A function that can be used to override the request URL.
      Returns:
      this instance for chaining