T - The model object typepublic class Autocomplete<T> extends org.apache.wicket.markup.html.form.TextField<T> implements IWiQueryPlugin
Creates an autocomplete UI component
org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider| Constructor and Description |
|---|
Autocomplete(String id)
Constructor
|
Autocomplete(String id,
org.apache.wicket.model.IModel<T> model)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
JsStatement |
close()
Method to close the autocomplete
This will return the element back to its pre-init state.
|
void |
close(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to close the autocomplete within the ajax request
|
void |
contribute(WiQueryResourceManager wiQueryResourceManager)
Declares resources (JavaScript and CSS files) to import.
|
JsStatement |
destroy()
Method to destroy the autocomplete
This will return the element back to its pre-init state.
|
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy the autocomplete within the ajax request
|
protected void |
detachModel() |
JsStatement |
disable()
Method to disable the autocomplete
|
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable the button within the ajax request
|
JsStatement |
enable()
Method to enable the autocomplete
|
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable the autocomplete within the ajax request
|
String |
getAppendTo() |
int |
getDelay() |
int |
getMinLength() |
protected Options |
getOptions()
Method retrieving the options of the component
|
PositionOptions |
getPosition() |
AutocompleteSource |
getSource() |
boolean |
isDisabled() |
JsStatement |
search()
Method to search the autocomplete
|
void |
search(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to search the autocomplete within the ajax request
|
void |
search(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
String value)
Method to search the autocomplete within the ajax request
|
JsStatement |
search(String value)
Method to search the autocomplete
|
Autocomplete<T> |
setAppendTo(String appendTo)
The element passed to or selected by the appendTo option will be used as
the container for the suggested values
|
Autocomplete<T> |
setChangeEvent(JsScopeUiEvent change)
After an item was selected; ui.item refers to the selected item.
|
Autocomplete<T> |
setCloseEvent(JsScopeUiEvent close)
When the list is hidden - doesn't have to occur together with a change.
|
Autocomplete<T> |
setDelay(int delay)
The delay in milliseconds the autocomplete waits after a keystroke to
activate itself.
|
Autocomplete<T> |
setDisabled(boolean disabled)
Disables (true) or enables (false) the autocomplete.
|
Autocomplete<T> |
setFocusEvent(JsScopeUiEvent focus)
Before focus is moved to an item (not selecting), ui.item refers to the
focused item.
|
Autocomplete<T> |
setMinLength(int minLength)
The minimum number of characters a user has to type before the
autocomplete activates.
|
Autocomplete<T> |
setOpenEvent(JsScopeUiEvent open)
After a request with the data ready, before it is actually displayed; also
indicates the suggestion menu will be opened.
|
Autocomplete<T> |
setPosition(PositionOptions position)
Position of the component of the suggested values with the input field
|
Autocomplete<T> |
setSearchEvent(JsScopeUiEvent search)
Before a request (source-option) is started, after minLength and delay are met.
|
Autocomplete<T> |
setSelectEvent(JsScopeUiEvent select)
Triggered when an item is selected from the menu; ui.item refers to the
selected item.
|
Autocomplete<T> |
setSource(AutocompleteSource source)
Defines the data to use, must be specified.
|
JsStatement |
statement()
Returns the main
JsStatement used to create the plugin. |
JsStatement |
widget()
Method to returns the .ui-autocomplete element
|
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-autocomplete element within the ajax request
|
getInputType, onComponentTagconvertInput, convertValue, getConvertEmptyInputStringToNull, isInputNullable, onBeforeRender, setConvertEmptyInputStringToNull, supportsPersistenceadd, add, checkRequired, clearInput, error, getConvertedInput, getDefaultLabel, getDefaultLabel, getForm, getInput, getInputAsArray, getInputName, getModel, getModelObject, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputChanged, internalOnModelChanged, invalid, isMultiPart, isPersistent, isRequired, isValid, newValidatable, onDetach, onDisabled, onInvalid, onValid, processChildren, processInput, setConvertedInput, setLabel, setModel, setModelObject, setModelValue, setModelValue, setPersistent, setRequired, setType, shouldTrimInput, trim, updateModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrdergetLabel, setLabelInternalgetMarkupType, getWebPage, getWebRequestadd, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeginRequest, onConfigure, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrappublic Autocomplete(String id)
id - Wicket identifiantprotected void detachModel()
detachModel in class org.apache.wicket.Componentpublic void contribute(WiQueryResourceManager wiQueryResourceManager)
contribute in interface IWiQueryPluginwiQueryResourceManager - The WiQueryResourceManager instance managing this
component resources.IWiQueryPlugin.contribute(org.odlabs.wiquery.core.commons.WiQueryResourceManager)protected Options getOptions()
public JsStatement statement()
JsStatement used to create the plugin.statement in interface IWiQueryPluginJsStatement corresponding to this component.IWiQueryPlugin.statement()public Autocomplete<T> setAppendTo(String appendTo)
appendTo - public String getAppendTo()
public Autocomplete<T> setDelay(int delay)
delay - public int getDelay()
public Autocomplete<T> setMinLength(int minLength)
minLength - public int getMinLength()
public Autocomplete<T> setPosition(PositionOptions position)
position - public PositionOptions getPosition()
public Autocomplete<T> setSource(AutocompleteSource source)
source - public AutocompleteSource getSource()
public Autocomplete<T> setDisabled(boolean disabled)
disabled - public boolean isDisabled()
public Autocomplete<T> setChangeEvent(JsScopeUiEvent change)
change - public Autocomplete<T> setCloseEvent(JsScopeUiEvent close)
close - public Autocomplete<T> setFocusEvent(JsScopeUiEvent focus)
focus - public Autocomplete<T> setOpenEvent(JsScopeUiEvent open)
open - public Autocomplete<T> setSearchEvent(JsScopeUiEvent search)
search - public Autocomplete<T> setSelectEvent(JsScopeUiEvent select)
select - public JsStatement close()
public void close(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement destroy()
public void destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement disable()
public void disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement enable()
public void enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement search()
public void search(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement search(String value)
value - Stringpublic void search(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
String value)
ajaxRequestTarget - value - Stringpublic JsStatement widget()
public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - Copyright © 2009-2012. All Rights Reserved.