I have a drop-down menu:
<ace:selectMenu value="#{MenuBean.cityList}" valueChangeListener="#{MenuBean.ChCountry}">
<f:selectItems itemValue="cityList.id" itemLabel="cityList_nm_city" />
</ace:selectMenu>
and an input field
<h:inputText id="form:nm" value="#{MenuBean.nm}" />
which uses jQuery autocomplete
$(document).ready(function() {
$("#form\\:nm").autocomplete({
source : function(request, response) {
$.ajax({
url : url,
data : {
method : "getnm",
},
success : function(data) {
alert("success");
}
});
}
});
});
When I change the drop-down and update JSF components, then jQuery autocomplete does not work anymore. How is this caused and how can I solve it?