I wonder if there is a trick to validate all fields in a form except one ?
Something like :
<p:remoteCommand process="@form^F100" .... />
Obviously, this doesn’t work…
If I have 100 fields in a form, is there any way or shortcut to validate all exception F100 for example ?
Am I doomed to use
<p:remoteCommand process="F1 F2 F3 F4 F5 F6 .... F99" .... />
?
You can use PrimeFaces Selectors (PFS) for this. This allows you using jQuery CSS selector syntax in
processandupdateattributes of PrimeFaces ajax components. You could for example use anoprocessclass on the component which you’d like to skip and use:not(.noprocess)selector.Your particular requirement can then be solved as follows:
This example will process the entire form expect of inputs having
class="noprocess"in the client side.