This content has been marked as final. Show 1 reply
There are many ways to do this:
- page specific solution: put your code between try-catch, catch the exception and create a FacesMessage. Or bind your JSF componont to a validator e.g. a method in your bean and validate it there before doing a CRUD.
- general solution: configure the exception in your pages.xml and set a general message inside it (you must disable debug mode in Seam & Facelets to see this working). Or you can write an @Observer(
with the name of the exception) and create a FacesMessage(s) inside it.
Hope this helps.