Ajax Action
a4j:ajax
a4j:commandButton
a4j:commandLink
a4j:actionListener
a4j:jsFunction
a4j:poll
a4j:push
a4j:param
Ajax Queue
a4j:queue
a4j:attachQueue
Ajax Output/Containers
a4j:outputPanel
a4j:status
a4j:region
a4j:mediaOutput
a4j:log
Validation
Client Side Validation
rich:graphValidator
rich:message
rich:messages
rich:notify
Data Iteration
a4j:repeat
rich:dataTable
rich:extendedDataTable
rich:collapsibleSubTable
rich:dataScroller
rich:list
rich:dataGrid
Trees
rich:tree
Tree Adaptors
Output/Panels
rich:panel
rich:togglePanel
rich:tabPanel
rich:collapsiblePanel
rich:accordion
rich:popupPanel
rich:progressBar
rich:tooltip
Menus
rich:panelMenu
rich:toolbar
rich:contextMenu
rich:dropDownMenu
Inputs
rich:autocomplete
rich:calendar
rich:editor
rich:inputNumberSlider
rich:inputNumberSpinner
rich:inplaceInput
rich:fileUpload
Selects
rich:inplaceSelect
rich:select
rich:orderingList
rich:pickList
Drag and Drop
Drag and Drop
Miscellaneous
Standard elements skinning
Placeholder
RichFaces functions
Focus
rich:componentControl
rich:hashParam
rich:hotKey
rich:jQuery

The rich:autocomplete component looks like a simple input component, but has advanced options and features to provide suggestions to the user during input.

There are four different modes for how it fetches suggestions:

  • client - preloads data to the client and makes suggestions according to the entered prefix on the client
  • lazyClient - similar to client but initial suggestions loading performed not during the page load but on first component activation.
  • ajax - fetches the data on every input change using Ajax requests
  • cachedAjax - loads data via Ajax to make suggestions when the prefix length satisfies minChars attribute value. Then all the suggestions are handled at the client until the initial prefix is changed. At that point it will reload with the new prefix.

1) provides suggestions for US state names using the cachedAjax mode with minChars="2".

2) Same suggestions in lazyClient mode. Additionally allows multiple selections using tokens (comma and space chars). This means you will be able to separate different values with a space or comma and get a separate suggestions for any of them. The autoFill attribute is set to false so you will notice values are not automatically added.

3) With the selectFirst attribute set to false pressing enter will not choose the value from list automatically, but just submit currently entered value.