@Generated(value={"RichFaces CDK","4.5.0-SNAPSHOT"}) public class UIAutocomplete extends AbstractAutocomplete implements javax.faces.component.behavior.ClientBehaviorHolder, AjaxEventsProps, EventsKeyProps, EventsMouseProps, FocusProps, StyleClassProps, StyleProps, MetaComponentEncoder, MetaComponentResolver
The <r:autocomplete> component is an auto-completing input-box with built-in Ajax capabilities. It supports client-side suggestions, browser-like selection, and customization of the look and feel.
Modifier and Type | Class and Description |
---|---|
protected static class |
UIAutocomplete.Properties |
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
META_COMPONENT_SEPARATOR_CHAR
Constructor and Description |
---|
UIAutocomplete() |
Modifier and Type | Method and Description |
---|---|
Object |
getAutocompleteList()
A collection of suggestions that will be resented to the user
|
javax.el.MethodExpression |
getAutocompleteMethod()
A method which returns a list of suggestions according to a supplied prefix
|
String |
getClientFilterFunction()
A javascript function used to filter the result list returned from the ajax call to the server.
|
String |
getDefaultEventName() |
Collection<String> |
getEventNames() |
String |
getFamily() |
Object |
getFetchValue()
A value to set in the target input element on a choice suggestion that isn't shown in the suggestion table.
|
int |
getMinChars()
Minimal number of chars in input to activate suggestion popup
|
AutocompleteMode |
getMode()
Determine how the suggestion list is requested:
|
String |
getOnbeforedomupdate()
The client-side script method to be called after the ajax response comes back, but before the DOM is updated
|
String |
getOnbegin()
The client-side script method to be called before an ajax request.
|
String |
getOnblur()
Javascript code executed when this element loses focus.
|
String |
getOnchange()
Javascript code triggered when the field is blurred, if the value has changed.
|
String |
getOnclick()
Javascript code executed when a pointer button is clicked over this element.
|
String |
getOnclose()
Javascript code triggered when the menu is hidden.
|
String |
getOncomplete()
The client-side script method to be called after the DOM is updated
|
String |
getOndblclick()
Javascript code executed when a pointer button is double clicked over this element.
|
String |
getOnerror()
The client-side script method to be called when an error has occurred during Ajax communications
|
String |
getOnfocus()
Javascript code triggered when focus is moved to an item (not selecting).
|
String |
getOnkeydown()
Javascript code executed when a key is pressed down over this element.
|
String |
getOnkeypress()
Javascript code executed when a key is pressed and released over this element.
|
String |
getOnkeyup()
Javascript code executed when a key is released over this element.
|
String |
getOnmousedown()
Javascript code executed when a pointer button is pressed down over this element.
|
String |
getOnmousemove()
Javascript code executed when a pointer button is moved within this element.
|
String |
getOnmouseout()
Javascript code executed when a pointer button is moved away from this element.
|
String |
getOnmouseover()
Javascript code executed when a pointer button is moved onto this element.
|
String |
getOnmouseup()
Javascript code executed when a pointer button is released over this element.
|
String |
getOnopen()
Javascript code triggered when the suggestion menu is opened or updated.
|
String |
getOnresponse()
Javascript code triggered after a search completes, before the menu is shown.
|
String |
getOnsearch()
Javascript code triggered before a search is performed, after minLength and delay are met.
|
String |
getOnselect()
Javascript code triggered when an item is selected from the menu.
|
String |
getOnselectitem() |
String |
getStyle()
CSS style(s) to be applied when this component is rendered.
|
String |
getStyleClass()
Space-separated list of CSS style class(es) to be applied when this element is rendered.
|
String |
getTabindex()
Position of this element in the tabbing order for the current document.
|
String |
getTokens()
Allow a user to enter multiple values separated by specific characters.
|
String |
getVar()
A request-scope attribute via which the data object for the current row will be used when iterating
|
boolean |
isAutofill()
Causes the combo-box to fill the text field box with a matching suggestion as the user types
|
boolean |
isDisabled()
Boolean value indicating whether this component is disabled
|
boolean |
isSelectFirst()
Boolean value indicating whether the first suggestion item is selected as the user types
|
boolean |
isShowButton()
Boolean value indicating whether to display a button to expand the popup suggestion element
|
void |
setAutocompleteList(Object autocompleteList) |
void |
setAutocompleteMethod(javax.el.MethodExpression autocompleteMethod) |
void |
setAutofill(boolean autofill) |
void |
setClientFilterFunction(String clientFilterFunction) |
void |
setDisabled(boolean disabled) |
void |
setFetchValue(Object fetchValue) |
void |
setMinChars(int minChars) |
void |
setMode(AutocompleteMode mode) |
void |
setOnbeforedomupdate(String onbeforedomupdate) |
void |
setOnbegin(String onbegin) |
void |
setOnblur(String onblur) |
void |
setOnchange(String onchange) |
void |
setOnclick(String onclick) |
void |
setOnclose(String onclose) |
void |
setOncomplete(String oncomplete) |
void |
setOndblclick(String ondblclick) |
void |
setOnerror(String onerror) |
void |
setOnfocus(String onfocus) |
void |
setOnkeydown(String onkeydown) |
void |
setOnkeypress(String onkeypress) |
void |
setOnkeyup(String onkeyup) |
void |
setOnmousedown(String onmousedown) |
void |
setOnmousemove(String onmousemove) |
void |
setOnmouseout(String onmouseout) |
void |
setOnmouseover(String onmouseover) |
void |
setOnmouseup(String onmouseup) |
void |
setOnopen(String onopen) |
void |
setOnresponse(String onresponse) |
void |
setOnsearch(String onsearch) |
void |
setOnselect(String onselect) |
void |
setOnselectitem(String onselectitem) |
void |
setSelectFirst(boolean selectFirst) |
void |
setShowButton(boolean showButton) |
void |
setStyle(String style) |
void |
setStyleClass(String styleClass) |
void |
setTabindex(String tabindex) |
void |
setTokens(String tokens) |
void |
setVar(String var) |
encodeMetaComponent, getLayout, resolveClientId, setLayout, substituteUnresolvedClientId, visitTree
addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue
getConverter, getLocalValue, setConverter
addClientBehavior, addFacesListener, broadcast, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClientBehavior, getClientBehaviors
encodeMetaComponent
resolveClientId, substituteUnresolvedClientId
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public String getFamily()
getFamily
in class javax.faces.component.UIInput
public Collection<String> getEventNames()
getEventNames
in interface javax.faces.component.behavior.ClientBehaviorHolder
getEventNames
in class javax.faces.component.UIComponentBase
public String getDefaultEventName()
getDefaultEventName
in interface javax.faces.component.behavior.ClientBehaviorHolder
getDefaultEventName
in class javax.faces.component.UIComponentBase
public Object getAutocompleteList()
AbstractAutocomplete
getAutocompleteList
in class AbstractAutocomplete
public void setAutocompleteList(Object autocompleteList)
public javax.el.MethodExpression getAutocompleteMethod()
AbstractAutocomplete
getAutocompleteMethod
in class AbstractAutocomplete
public void setAutocompleteMethod(javax.el.MethodExpression autocompleteMethod)
setAutocompleteMethod
in class AbstractAutocomplete
public boolean isAutofill()
AbstractAutocomplete
isAutofill
in class AbstractAutocomplete
public void setAutofill(boolean autofill)
public String getClientFilterFunction()
AbstractAutocomplete
A javascript function used to filter the result list returned from the ajax call to the server. This function should have two parameters; subString(current input value considering tokens) and value (currently iterated item value) and return boolean flag which means if the value satisfies the substring passed. The function will be called for every available suggestion in order to construct a new list of suggestions.
Default: A javascript method called startsWith
getClientFilterFunction
in class AbstractAutocomplete
public void setClientFilterFunction(String clientFilterFunction)
public boolean isDisabled()
AbstractAutocomplete
Default: false
isDisabled
in class AbstractAutocomplete
public void setDisabled(boolean disabled)
public Object getFetchValue()
AbstractAutocomplete
getFetchValue
in class AbstractAutocomplete
public void setFetchValue(Object fetchValue)
public int getMinChars()
AbstractAutocomplete
getMinChars
in class AbstractAutocomplete
public void setMinChars(int minChars)
public AutocompleteMode getMode()
AbstractAutocomplete
Determine how the suggestion list is requested:
Default: cachedAjax
getMode
in class AbstractAutocomplete
public void setMode(AutocompleteMode mode)
public String getOnbeforedomupdate()
AjaxEventsProps
getOnbeforedomupdate
in interface AjaxEventsProps
public void setOnbeforedomupdate(String onbeforedomupdate)
public String getOnbegin()
AjaxEventsProps
getOnbegin
in interface AjaxEventsProps
public void setOnbegin(String onbegin)
public String getOnblur()
FocusProps
getOnblur
in interface FocusProps
public void setOnblur(String onblur)
public String getOnchange()
AbstractAutocomplete
getOnchange
in class AbstractAutocomplete
public void setOnchange(String onchange)
public String getOnclick()
EventsMouseProps
getOnclick
in interface EventsMouseProps
public void setOnclick(String onclick)
public String getOnclose()
AbstractAutocomplete
getOnclose
in class AbstractAutocomplete
public void setOnclose(String onclose)
public String getOncomplete()
AjaxEventsProps
getOncomplete
in interface AjaxEventsProps
public void setOncomplete(String oncomplete)
public String getOndblclick()
EventsMouseProps
getOndblclick
in interface EventsMouseProps
public void setOndblclick(String ondblclick)
public String getOnerror()
AbstractAutocomplete
getOnerror
in class AbstractAutocomplete
public void setOnerror(String onerror)
public String getOnfocus()
AbstractAutocomplete
getOnfocus
in interface FocusProps
getOnfocus
in class AbstractAutocomplete
public void setOnfocus(String onfocus)
public String getOnkeydown()
EventsKeyProps
getOnkeydown
in interface EventsKeyProps
public void setOnkeydown(String onkeydown)
public String getOnkeypress()
EventsKeyProps
getOnkeypress
in interface EventsKeyProps
public void setOnkeypress(String onkeypress)
public String getOnkeyup()
EventsKeyProps
getOnkeyup
in interface EventsKeyProps
public void setOnkeyup(String onkeyup)
public String getOnmousedown()
EventsMouseProps
getOnmousedown
in interface EventsMouseProps
public void setOnmousedown(String onmousedown)
public String getOnmousemove()
EventsMouseProps
getOnmousemove
in interface EventsMouseProps
public void setOnmousemove(String onmousemove)
public String getOnmouseout()
EventsMouseProps
getOnmouseout
in interface EventsMouseProps
public void setOnmouseout(String onmouseout)
public String getOnmouseover()
EventsMouseProps
getOnmouseover
in interface EventsMouseProps
public void setOnmouseover(String onmouseover)
public String getOnmouseup()
EventsMouseProps
getOnmouseup
in interface EventsMouseProps
public void setOnmouseup(String onmouseup)
public String getOnopen()
AbstractAutocomplete
getOnopen
in class AbstractAutocomplete
public void setOnopen(String onopen)
public String getOnresponse()
AbstractAutocomplete
getOnresponse
in class AbstractAutocomplete
public void setOnresponse(String onresponse)
public String getOnsearch()
AbstractAutocomplete
getOnsearch
in class AbstractAutocomplete
public void setOnsearch(String onsearch)
public String getOnselect()
AbstractAutocomplete
getOnselect
in class AbstractAutocomplete
public void setOnselect(String onselect)
public String getOnselectitem()
getOnselectitem
in class AbstractAutocomplete
public void setOnselectitem(String onselectitem)
public boolean isSelectFirst()
AbstractAutocomplete
Default: true
isSelectFirst
in class AbstractAutocomplete
public void setSelectFirst(boolean selectFirst)
public boolean isShowButton()
AbstractAutocomplete
Boolean value indicating whether to display a button to expand the popup suggestion element
Default: false
isShowButton
in class AbstractAutocomplete
public void setShowButton(boolean showButton)
public String getStyle()
StyleProps
getStyle
in interface StyleProps
public void setStyle(String style)
public String getStyleClass()
StyleClassProps
getStyleClass
in interface StyleClassProps
public void setStyleClass(String styleClass)
public String getTabindex()
FocusProps
getTabindex
in interface FocusProps
public void setTabindex(String tabindex)
public String getTokens()
AbstractAutocomplete
Allow a user to enter multiple values separated by specific characters. As the user types, a suggestion will present as normal. When they enter the specified token character, this begins a new suggestion process, and the component will then only use text entered after the token character for suggestions.
Make sure that no character defined in tokens is part of any suggestion value. E.g. do not use space as a token if you expect to allow spaces in suggestion values.
When tokens defined, they can be naturally separated by space character - input separated by tokens ', ' or ' ,' will be considered as it would be ',' token without any space.
getTokens
in class AbstractAutocomplete
public void setTokens(String tokens)
public String getVar()
AbstractAutocomplete
getVar
in class AbstractAutocomplete
public void setVar(String var)
Copyright © 2014 JBoss by Red Hat. All rights reserved.