I have a situation that I haven't found any questions on yet.
Basically, I had to use the twitter-bootstrap typeahead on an input field.
However, this input field was a JSF inputText field like this:
<h:inputText id="arrivalAirport" value="#{searchFlightsBean.arrivalAirport}" styleClass="input-block-level blue-highlight" placeholder="Enter arrival city">
</h:inputText>
Unfortunately, the twitter-bootstrap typeahead doesn't work with JSF inputText fields - at least, I wasn't able to get it working(If there is a way to do that, please let me know in a comment!).
I had to use a normal input field inside the JSF form, like this:
<input data-provide="typeahead" value="#{searchFlightsBean.departureAirport}" class="input-override input-block-level blue-highlight airportSearch" placeholder="Enter departure city">
</input>
I got this working perfectly with the typeahead code.
One problem: The bean doesn't get the normal input field's value - that's the reason we were using JSF in the first place.
I need to use a normal input field for the typeahead JS, and I need to use a JSF inputText field in order to get the value to the bean.
Is there a way for me to do this?