The AutoComplete component provides a list of matching suggestions based on what you have already typed in the input field. This enables the user to quickly select available options without the need of completely typing the value.
In our TechBuzz application, we will use the <p:autoComplete>
component in the Search Users screen. In the Search Users screen, we can search other users by their e-mail IDs. By using the AutoComplete component, we will display a list of e-mail IDs that start with what the user typed in the input field, by using the following code:
<p:autoComplete value="#{userController.searchEmail}" completeMethod="#{userController.completeEmail}"/>
The AutoComplete component provides the following attributes to customize its behavior: