java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
de.agilecoders.wicket.extensions.markup.html.bootstrap.form.typeaheadV10.bloodhound.Bloodhound<T>
All Implemented Interfaces:
Source<T>, Serializable, IComponentAwareEventSink, IRequestListener, IComponentAwareHeaderContributor, IClusterable
Direct Known Subclasses:
LocalBloodhound

public abstract class Bloodhound<T> extends AbstractAjaxBehavior implements Source<T>
A Bloodhound source.
See Also:
  • Constructor Details

    • Bloodhound

      public Bloodhound(String name)
      This constructor will initialize a default BloodhoundConfig
      Parameters:
      name - the name of this bloodhound instance
    • Bloodhound

      public Bloodhound(String name, BloodhoundConfig config)
      Parameters:
      name - the name of this bloodhound instance
  • Method Details

    • getName

      public String getName()
      Returns:
      the name of this instance
    • getFunction

      public de.agilecoders.wicket.jquery.util.Json.RawValue getFunction()
      Description copied from interface: Source
      Get the javascript function for this source.
      Specified by:
      getFunction in interface Source<T>
      Returns:
      the javascript function used as the source of a DataSet
    • onBind

      protected void onBind()
      Overrides:
      onBind in class AbstractAjaxBehavior
    • getRemoteUrl

      protected CharSequence getRemoteUrl(String wildcard)
    • getChoices

      public abstract Iterable<T> getChoices(String input)
      Description copied from interface: Source
      Get an iterable of choices for the given input term.
      Specified by:
      getChoices in interface Source<T>
    • getConfig

      public BloodhoundConfig getConfig()
    • onRequest

      public void onRequest()
      Specified by:
      onRequest in interface IRequestListener
    • createJson

      protected String createJson(Iterable<T> choices)
      Serializes the returned choices into JSON array.
      Parameters:
      choices - the choices for the term
      Returns:
      JSON array with all choices