Module wicket.bootstrap.extensions
Class Bloodhound<T>
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
A Bloodhound
source.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBloodhound(String name) This constructor will initialize a defaultBloodhoundConfigBloodhound(String name, BloodhoundConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateJson(Iterable<T> choices) Serializes the returned choices into JSON array.getChoices(String input) Get an iterable of choices for the given input term.de.agilecoders.wicket.jquery.util.Json.RawValueGet the javascript function for this source.getName()protected CharSequencegetRemoteUrl(String wildcard) protected voidonBind()voidMethods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindMethods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag, renderHeadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.wicket.IRequestListener
rendersPageMethods inherited from interface de.agilecoders.wicket.extensions.markup.html.bootstrap.form.typeaheadV10.Source
renderChoice
-
Constructor Details
-
Bloodhound
This constructor will initialize a defaultBloodhoundConfig- Parameters:
name- the name of this bloodhound instance
-
Bloodhound
- Parameters:
name- the name of this bloodhound instance
-
-
Method Details
-
getName
- Returns:
- the name of this instance
-
getFunction
public de.agilecoders.wicket.jquery.util.Json.RawValue getFunction()Description copied from interface:SourceGet the javascript function for this source.- Specified by:
getFunctionin interfaceSource<T>- Returns:
- the javascript function used as the source of a
DataSet
-
onBind
protected void onBind()- Overrides:
onBindin classAbstractAjaxBehavior
-
getRemoteUrl
-
getChoices
Description copied from interface:SourceGet an iterable of choices for the given input term.- Specified by:
getChoicesin interfaceSource<T>
-
getConfig
-
onRequest
public void onRequest()- Specified by:
onRequestin interfaceIRequestListener
-
createJson
Serializes the returned choices into JSON array.- Parameters:
choices- the choices for the term- Returns:
- JSON array with all choices
-