An AJAX extension project for JSF actually has a better choice for users who use Myfaces: Using the Inputsuggestajax in Myfaces Sandbox
Usage is as follows:
1. Create a managed Bean:
package test;
Import java.util.ArrayList;
import java.util.List;
public class Bean {
//in t Hat function All what your had to ' do ' to
//specify what'll be displayed in the list
//note Keyword is the "text entered by" User
Public List getsuggestedwords (String keyword) {
list Li st = new ArrayList ();
List.add (keyword + "Ahmed Saleh");
List.add (keyword + "Kahki");
List.add (keyword + "kourany");
List.add (keyword + "Kiki");
List.add (keyword + "Saleh abouetta");
List.add (keyword + "Hashim");
return list;
}
Public String GetCurrentValue () {
return currentvalue
public void Setcurrentvalue (String currentvalue) {
This.currentvalue = CurrentValue;
}
String CurrentValue;
}
2.jsp page Code
<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>
<%@ taglib uri="" prefix="s" %>
<title>Ajax JSF sample (InputSuggestAjax)</title>
<body>
<f:view>
<s:inputSuggestAjax suggestedItemsMethod="#{bean.getSuggestedWords}"
value="#{bean.currentValue}" />
<br />
<br />
</f:view>
</body>
3.web.xml Configuration
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
//Instead of server make the state saving method on the client to make it works