Combining twitter typeahead with JSF inputText -


snippet of html:

<h:panelgrid width="100%">   <h:outputtext value="from:"></h:outputtext>   <h:inputtext id="departureairport" value="#{searchflightsbean.departureairport}" styleclass="input-block-level blue-highlight" placeholder="enter departure city" required="true">     <f:validatelength minimum="3" maximum="20" />   </h:inputtext>   <h:message for="departureairport" styleclass="alert alert-error" /> </h:panelgrid> 

i want to, eventually, pull data field via ajax, , suggest options user while he/she typing.

i have included following in page:

<h:outputstylesheet name="css/bootstrap.css" /> <h:outputstylesheet name="css/main.css" /> <h:outputscript name="js/jquery-2.0.2.min.js" /> <h:outputscript name="js/bootstrap-typeahead.js" /> 

and have following js, i'm using test autocompletion:

$(document).ready(function () {   $('#departureairport').typeahead([ {     name: 'planets',     local: [ "mercury", "venus", "earth", "mars", "jupiter", "saturn", "uranus", "neptune" ]   }]); }); 

the autocompletion not working. know why, exactly? got typeahead example here, if interested.

it seems jsf , twitter-bootstrap don't play together. got working noraml input field.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -