jQuery auto complete with jsf

i have developed jquery autocomplete with jsf and it's working fine. but when i add h:form it's not working

this is my code. /* auto complete */

with above code autocomplete is working fine... but when i put h:inputbox inside h:form it's not working. without putting it in h:form i will not able to submit it's value to jsf backing bean. please give me valuable idea to get this correct. Thanks in advance

if you put h:inputbox inside the h:form auto complete will not work. so you have to put h:inputbox outside of h:form and get that value by javascript and assign to h:hiddeninput textbox. then your autocomplete will work.

Helpful hint: Look up above the text input area in our message editor and you'll see a button labelled "Code". You can use this button to generate code tags around preformatted data such as Java source or XML. It makes things a lot easier to read.

Don't use the "$" notation on jQuery on JSF. The "$" means things to the EL processor that you don't want it to mean. Use the long-form alternative ("jQuery.") instead.

In JSF, there is now a lot of support for AJAX. JSF2 includes an ajax tag in the core tagset. Many of the extension tagsets such as RichFaces, IceFaces, PrimeFaces, and so forth provide AJAX support as well. I use the autocomplete function in RichFaces extensively. If you use JSF's AJAX features, you may find that you will have to write little JavaScript, if any. JSF will write the JavaScript for you. In in some cases, it will even write jQuery code for you!