Primefaces get chosen value in autocomplete

1

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 ?

    
asked by anonymous 31.01.2017 / 18:26

1 answer

1

Personal thank you all for the help, I found the problem. I had to change this code:

 <f:ajax event="itemSelect" render="selectOneMenuChaveContrato" execute="@this"/>

By this:

 <p:ajax event="itemSelect" />

Thank you all!

    
31.01.2017 / 19:21