Navigating large sets of data can retrieving the proper results can be a tedious task. Conventional web applications require that the user clicks through a set of pages to locate relevant data.

Consider using this solution in usecases such as the following:

  • Searching for a user name
  • Searching for an e-mail address
  • Searching for a product
  • Searching for a city name

The AutoComplete in Ajax is a web based component which allows you to do a google like search. Ajax autocomplete has become really popular after major search engines like google, yahoo have integrated it and now each user of a web application demands such kind of a functionality.

Below is the code which you will need to use for using autocomplete in your java,JSF based web application.

<rich:suggestionbox width="200"

suggestionAction="#{Obj.autocomplete}"

var="Obj" for="SearchString">

<h:column>

<h:outputText value="#{Obj.name}" />

<rich:separator height="1px" />

<h:outputText value="#{Obj.getDescription()}" />

</h:column>

</rich:suggestionbox>

Auto-completion will enhance the user experience and help users get directly to the target data. There is more load on the web component that performs the searches as a result of multiple micro-search requests for each interaction.

For more details on this solution see the Auto-Completion with AJAX JQUERY


Related Posts:




Sandeep Joshi
Mathematics, Technology and Programming are my passion. I am a part of Java Ecosystem and through this blog, I contribute to it. I am here to blog about my interests, views and experiences.
I am on Google+ and Facebook.
I feel proud to be listed as a "National Memory Record Holder" in the Limca Book of Records, 2009 and have attempted for an International Memory record in the Guiness Book of Records. I can remember the value of PI upto 10,000 digits after the decimal (3.1415.....). You can contact me on javagenious.com(At)gmal.com ; I would like to hear from you :)