xhtml 中 jsf2.0 中的 Jquery 自动完成工作正常,但是当我尝试在选择函数中为支持 bean 设置值时,它没有被设置,我使用过
<div class="ui-widget" style="font-size: 0.9em; padding-left: 0.3em;" >
<label for="organizatiosSelectAuto">Representative Organization: </label>
<h:inputText id="organizationSelectAuto"/>
</div>
<h:inputText id="orgIDHidden" value="#{letterMBean.orgID}" style="" immediate="true" onchange="submit()" valueChangeListener="#{letterMBean.orgChanged(this)}"/>
$(function() {
var availableTags = #{jqueryClientList.arrayObj} ;
$( '#organizationSelectAuto' ).autocomplete({
source: availableTags,
minLength: 2,
select: function( event, ui ) {
alert("id"+ui.item.id);
document.getElementById('housefrm:orgIDHidden').value = ui.item.id;
alert("input Text vlaue"+document.getElementById('housefrm:orgIDHidden').value);
}
});
});