I'm trying to use Omnifaces's validator in the following lines of code:
<p:inputText
value="#{createEventBean.newGuest.name}">
<o:validator validatorId="javax.faces.Required"
message="Numbers only" />
</p:inputText>
But I get the following error:
DefaultFacele E Exiting serializeView - Could not serialize state: org.omnifaces.taghandler.Validator
java.io.NotSerializableException: org.omnifaces.taghandler.Validator
The most close SO discussion to this issue I find here: java.io.NotSerializableException - org.omnifaces.taghandler.Converter but I use MyFaces 2.0.3 implementation by Websphere 8.0.0.9 together with PrimeFaces 5.1, can it be the same bug? This lines of code work without any issues:
<p:inputText id="phone" styleClass="mask-num"
value="#{adminBean.user.mobilePhone}">
<o:validator validatorId="javax.faces.RegularExpression"
pattern="[0-9-]*" message="Numbers only" />
</p:inputText>
Am I use it wrong or is there workaround for this issue? Thank you.