I'm working with AutoComplete
of primefaces
and I'm having a problem. For example, the user types the OSW word in the combo and then dropdown
lists all contracts that have the term OSW .
So far so good, but when the user selects in the dropdown the contract I can not get the content selected by him, I can only get the word he typed to find the contract.
My code:
<p:autoComplete id="inputTextFornecedorComplete" dropdown="true"forceSelection="true"
minQueryLength="3" size="82" maxResults="15"
value="#{contratoNotaFiscalBean.sessionBean.itemPagina.contrato.chaveContrato}" class="autoCompletar"
completeMethod="#{contratoNotaFiscalBean.completeText}"
rendered="#{contratoNotaFiscalBean.sessionBean.operacaoInclusao}">
<f:ajax event="itemSelect" render="selectOneMenuChaveContrato" execute="@this"/>
</p:autoComplete>
Can anyone give me an idea how I can increment this code to get the chosen value in dropdown
?