Class ObjectAutoCompleteBehavior<O>
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.behavior.AbstractAjaxBehavior
-
- org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
- org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior
-
- org.wicketstuff.objectautocomplete.ObjectAutoCompleteBehavior<O>
-
- All Implemented Interfaces:
Serializable,IComponentAwareEventSink,IRequestListener,IComponentAwareHeaderContributor,IClusterable
public class ObjectAutoCompleteBehavior<O> extends AbstractAutoCompleteBehavior
Behaviour for object auto completion using a slightly modified variant of @see AbstractAutoCompleteBehavior An (hidden) element is required to store the object id which has been selected. The type parameter is the type of the object to be rendered (not it's id)- Since:
- May 18, 2008
- Author:
- roland
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior
AUTOCOMPLETE_JS, settings
-
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Iterator<O>getChoices(String input)protected voidinitHead(IHeaderResponse response)Initialize response with our own java scriptprotected voidonComponentTag(ComponentTag tag)protected voidonRequest(String input, RequestCycle requestCycle)voidrenderHead(Component c, IHeaderResponse response)Temporarily solution until patch from WICKET-1651 is applied.protected voidrespond(AjaxRequestTarget target)protected voidupdateAjaxAttributes(AjaxRequestAttributes attributes)-
Methods inherited from class org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior
constructSettingsJS
-
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onMethodMismatch, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
-
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onUnbind, unbind
-
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IRequestListener
rendersPage
-
-
-
-
Method Detail
-
renderHead
public void renderHead(Component c, IHeaderResponse response)
Temporarily solution until patch from WICKET-1651 is applied. Note, that we avoid a call to super to avoid the initialization in the direct parent class, but we have to copy over all other code from the parent,- Specified by:
renderHeadin interfaceIComponentAwareHeaderContributor- Overrides:
renderHeadin classAbstractAutoCompleteBehavior- Parameters:
response- response to write to
-
updateAjaxAttributes
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
- Overrides:
updateAjaxAttributesin classAbstractAutoCompleteBehavior
-
onRequest
protected void onRequest(String input, RequestCycle requestCycle)
- Specified by:
onRequestin classAbstractAutoCompleteBehavior
-
initHead
protected void initHead(IHeaderResponse response)
Initialize response with our own java script- Parameters:
response- response to write to
-
onComponentTag
protected void onComponentTag(ComponentTag tag)
- Overrides:
onComponentTagin classAbstractAjaxBehavior
-
respond
protected void respond(AjaxRequestTarget target)
- Overrides:
respondin classAbstractAutoCompleteBehavior
-
-