我想知道如何使用在Controller的autocomplete字段中键入的值,即使该值为null且不是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>