In primefaces, how to disable form validation ONLY ?
In my code, if I add immediate="true"
, it will skip whole process, Apply Request Values, Process Validations and Update Model Values phases, but in my case, I need the bean variable binding to submit a search form . If I remove this immediate setting, it will not submit this form, because orderNum is a bean id.
please refer to this post, PrimeFaces disable validation on cancel button
Thanks.
<h:form id="PurchaseOrderSearchForm">
<p:panelGrid columns="2" style="margin-top: 0px; width: 100%;">
<p:outputLabel value="OrderNum:" for="search_orderNum" />
<p:inputText id="search_orderNum" value="#{purchaseOrderController.searchPurchaseOrder.orderNum}" title="OrderNum" />
</p:panelGrid>
<div align="center" style="margin-top: 5px;">
<p:commandLink value="#{bundle.Search}" immediate="true" actionListener="#{purchaseOrderController.search}" update=":growl,:PurchaseOrderList:datalist"/>
</div>
</h:form>