1
Good afternoon, I would like to know how to use the value entered in the autocomplete field in my Controller, even if it is null and not a vehicle registered in the BD.
<p:outputLabel value="Veículo: " style="padding-right: 30px"/>
<p:autoComplete id="veiculo" dropdown="true"
label="Veículo" required="false" placeholder="Todos"
readonly="#{portariaController.tipoVeiculo == 'SEM_PLACA' || portariaController.tipoVeiculo == 'SEM_VEICULO'}"
value="#{portariaController.veiculo}"
completeMethod="#{veiculoController.completeVeiculos}"
maxResults="10" var="v" itemLabel="#{v.placa}"
converter="#{entityConverter}" itemValue="#{v}" forceSelection="false" >
<p:ajax event="itemSelect" update=":formPrincipal:pnlVeiculo" />
<p:ajax event="change" update=":formPrincipal:edit"/>
</p:autoComplete>
Can someone help me?
– Luis Fernando