public abstract class AbstractAutocomplete extends javax.faces.component.UIInput implements AjaxEventsProps, FocusProps, EventsKeyProps, EventsMouseProps, StyleProps, StyleClassProps, MetaComponentResolver, MetaComponentEncoder
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 | 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 |
---|
AbstractAutocomplete() |
Modifier and Type | Method and Description |
---|---|
void |
encodeMetaComponent(javax.faces.context.FacesContext context,
String metaComponentId)
Delegates rendering of meta components to Autocomplete renderer
|
abstract Object |
getAutocompleteList()
A collection of suggestions that will be resented to the user
|
abstract javax.el.MethodExpression |
getAutocompleteMethod()
A method which returns a list of suggestions according to a supplied prefix
|
abstract String |
getClientFilterFunction()
A javascript function used to filter the result list returned from the ajax call to the server.
|
abstract Object |
getFetchValue()
A value to set in the target input element on a choice suggestion that isn't shown in the suggestion table.
|
String |
getLayout()
Returns 'table' if all children are columns and thus the component should be rendered as a table; it returns 'list'
otherwise
|
abstract int |
getMinChars()
Minimal number of chars in input to activate suggestion popup
|
abstract AutocompleteMode |
getMode()
Determine how the suggestion list is requested:
|
abstract String |
getOnchange()
Javascript code triggered when the field is blurred, if the value has changed.
|
abstract String |
getOnclose()
Javascript code triggered when the menu is hidden.
|
abstract String |
getOnerror()
The client-side script method to be called when an error has occurred during Ajax communications
|
abstract String |
getOnfocus()
Javascript code triggered when focus is moved to an item (not selecting).
|
abstract String |
getOnopen()
Javascript code triggered when the suggestion menu is opened or updated.
|
abstract String |
getOnresponse()
Javascript code triggered after a search completes, before the menu is shown.
|
abstract String |
getOnsearch()
Javascript code triggered before a search is performed, after minLength and delay are met.
|
abstract String |
getOnselect()
Javascript code triggered when an item is selected from the menu.
|
abstract String |
getOnselectitem()
Deprecated.
use
getOnselect() ('select' event instead) |
abstract String |
getTokens()
Allow a user to enter multiple values separated by specific characters.
|
abstract String |
getVar()
A request-scope attribute via which the data object for the current row will be used when iterating
|
abstract boolean |
isAutofill()
Causes the combo-box to fill the text field box with a matching suggestion as the user types
|
abstract boolean |
isDisabled()
Boolean value indicating whether this component is disabled
|
abstract boolean |
isSelectFirst()
Boolean value indicating whether the first suggestion item is selected as the user types
|
abstract boolean |
isShowButton()
Boolean value indicating whether to display a button to expand the popup suggestion element
|
String |
resolveClientId(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent contextComponent,
String metaComponentId)
Resolves and returns string identifying supported meta-component or
null if provided meta-component name is
not a supported one. |
abstract void |
setAutocompleteMethod(javax.el.MethodExpression expression) |
void |
setLayout(String layout)
Deprecated.
|
String |
substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent contextComponent,
String metaComponentId)
Provides replacement for unresolved meta-component names.
|
boolean |
visitTree(javax.faces.component.visit.VisitContext context,
javax.faces.component.visit.VisitCallback callback)
Makes sure that the rendering of meta component is requested.
|
addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getFamily, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, 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, getValue, setConverter
addClientBehavior, addFacesListener, broadcast, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, 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, 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
getOnbeforedomupdate, getOnbegin, getOncomplete
getOnblur, getTabindex
getOnkeydown, getOnkeypress, getOnkeyup
getOnclick, getOndblclick, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup
getStyle
getStyleClass
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public abstract Object getAutocompleteList()
public abstract javax.el.MethodExpression getAutocompleteMethod()
public abstract void setAutocompleteMethod(javax.el.MethodExpression expression)
public abstract String getVar()
public abstract Object getFetchValue()
public abstract int getMinChars()
public abstract AutocompleteMode getMode()
Determine how the suggestion list is requested:
Default: cachedAjax
public abstract String getTokens()
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.
public abstract boolean isAutofill()
public abstract boolean isDisabled()
Default: false
public abstract boolean isShowButton()
Boolean value indicating whether to display a button to expand the popup suggestion element
Default: false
public abstract boolean isSelectFirst()
Default: true
public abstract String getClientFilterFunction()
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
public abstract String getOnselect()
@Deprecated public abstract String getOnselectitem()
getOnselect()
('select' event instead)public abstract String getOnchange()
public abstract String getOnclose()
public abstract String getOnfocus()
getOnfocus
in interface FocusProps
public abstract String getOnopen()
public abstract String getOnresponse()
public abstract String getOnsearch()
public abstract String getOnerror()
public String resolveClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolver
null
if provided meta-component name is
not a supported one.resolveClientId
in interface MetaComponentResolver
facesContext
- - current instance of FacesContext
contextComponent
- - instance of UIComponent
that requested resolution of meta-componentmetaComponentId
- - name of meta-component (without leading '@' sign)null
public String substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)
MetaComponentResolver
null
substituteUnresolvedClientId
in interface MetaComponentResolver
facesContext
- - current instance of FacesContext
contextComponent
- - instance of UIComponent
that requested resolution of meta-componentmetaComponentId
- - name of meta-component (without leading '@' sign)null
public boolean visitTree(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)
visitTree
in class javax.faces.component.UIComponent
public void encodeMetaComponent(javax.faces.context.FacesContext context, String metaComponentId) throws IOException
encodeMetaComponent
in interface MetaComponentEncoder
IOException
public String getLayout()
@Deprecated public void setLayout(String layout)
setLayout(String)
was deprecated in 5.0
The layout is determined by components provide as children of the autocomplete componentCopyright © 2013 JBoss by Red Hat. All Rights Reserved.