开发者

JSF Validation Server Side vs Custom Validators

开发者 https://www.devze.com 2023-02-21 16:47 出处:网络
I\'ve noticed that if I use a custom validator and also have validation in an actionListener or action that the custom validator gets executed first and the actionListener/action method never gets exe

I've noticed that if I use a custom validator and also have validation in an actionListener or action that the custom validator gets executed first and the actionListener/action method never gets executed if there is a failure in the custom v开发者_高级运维alidator. Is there any way to run all validation?


That is not possible. You should also not do the validation in action(listener) methods. You should use a real Validator to do validation.

True, the way how JSF default validation works is sometimes frustrating, but there are certainly ways to achieve the particular functional requirement using a real Validator. Feel free to ask a new question about that.

0

精彩评论

暂无评论...
验证码 换一张
取 消