I have a form with several fields and there is a block with two required fields and a search button. What i want is when i click on search button i want to ignore the form validations and that the two fields values to be set in the bean, but this doesnt happen. How should I apply the values?
EDIT: I have more required fields in the view, that in this case i want ignore.
<p:inputMask id="field1" mask="9999" styleClass="marginLeft input smaller"
requiredMessage="#{label.msg_requiredFields}"
required="true" value="#{cc.attrs.cena.field.cp4Offline}"/>
<p:inputMask id="field2" mask="999"
requiredMessage="#{label.msg_requiredFields}"
required="true" styleClass="input smallest"
value="#{cc.attrs.cena.field.cp3Offline}"/>
<p:commandButton id="pesquisarId" styleClass="marginLeft" icon="ui-icon-search"
actionListener="#{pesquisarMorada.pesquisar(cc.attrs.cena)}"
update="resultPesquisaPanelId" process="@this field1 field2" immediate="true"/>