Very interesting, simple and clear post about the way CDI events work…
Recently, I found out something very important about JSF validation: did you know that if you implement and associate a validation method, instead of a validation class and the component to be validated is empty, the validation code is not invoked? Well, according to BalusC in this post in stackoverflow, this is a known issue in JSF and, at the moment, it can be fixed only through the implementation of a validation class instead of a validation method (take a look at this recipe if you need to implement a validation class that uses some information from the backing bean). Hopefully, however, in the future, a new version of JSF implementation will take into account the new JSF 2.0 parameter “javax.faces.VALIDATE_EMPTY_FIELDS” and this workaround will no longer be necessary.
New recipe showing how to make use of attributes associated to a validating component when using JSF validation has been created.
Very cool…. One of the best ways to learn how to do it right, is knowing how to do it wrong! 🙂