This content has been marked as final. 
    
Show                 1 reply
    
- 
        
1. Re: How to handle validator and exception gracefully in ManyToOne relation?
serkan.s.eskici.online.nl Jun 9, 2010 2:35 PM (in response to alartin)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.