-
1. Re: SEAM event for "validation failed"
lightguard Oct 9, 2011 1:30 AM (in response to captainvoid)I don't remember off the top of my head if there is an event to listen to. If there is one, it'll be in the Faces module. If there isn't, would you please create a JIRA issue for this?
-
2. Re: SEAM event for "validation failed"
hantsy Oct 11, 2011 8:52 PM (in response to captainvoid)I tried to add an exceptionhandle to process the validation exception(added a global faces message), but it does not work as expected.
-
3. Re: SEAM event for "validation failed"
lightguard Oct 11, 2011 10:13 PM (in response to captainvoid)That's great Hantsy, a little more info please? The exception you're getting, handlers, etc. Maybe debug the Seam Faces module a little bit and give us some more info.
-
4. Re: SEAM event for "validation failed"
hantsy Oct 12, 2011 2:48 AM (in response to captainvoid)I use a exceptionhandle like this. I wanted to add a global message when validation was failed.
@HandlesExceptions public class GeneralExceptionHandler { @Inject Messages messages; public void catchValidationException( @Handles CaughtException<ConstraintViolationException> event, Logger log) { log.info("Exception logged by seam-catch catcher: " + event.getException().getMessage()); messages.error(new DefaultBundleKey("validation_failed")).defaults( "Validation failed"); }
But it did not work.
-
5. Re: SEAM event for "validation failed"
lightguard Oct 12, 2011 3:48 AM (in response to captainvoid)
hantsy bai wrote on Oct 12, 2011 02:48:
I use a exceptionhandle like this. I wanted to add a global message when validation was failed.@HandlesExceptions public class GeneralExceptionHandler { @Inject Messages messages; public void catchValidationException( @Handles CaughtException<ConstraintViolationException> event, Logger log) { log.info("Exception logged by seam-catch catcher: " + event.getException().getMessage()); messages.error(new DefaultBundleKey("validation_failed")).defaults( "Validation failed"); }
But it did not work.Is a ConstraintViolationException not what's thrown? It seems odd that this wouldn't be caught. The only thing I could offer you is to debug into the exception handling classes of Seam Faces and see what's going on there.
-
6. Re: SEAM event for "validation failed"
hantsy Oct 12, 2011 9:25 AM (in response to captainvoid)I got a debug info in the console.
21:09:03,870 INFO [org.jboss.seam.faces.exception.CatchExceptionHandlerFactory] (http--127.0.0.1-8080-8) Catch not available, Catch integration disabled
PS:I used Seam 3.1.0 Beta3 and Jboss 7.0.1Final.
-
7. Re: SEAM event for "validation failed"
lightguard Oct 12, 2011 2:37 PM (in response to captainvoid)Oops. Looks like we missed something when we moved Catch to Solder, sorry about that. We'll get that fixed for the next release.
-
8. Re: SEAM event for "validation failed"
lightguard Oct 12, 2011 2:42 PM (in response to captainvoid)Hm, looks like it's there, what libraries do you have in your app?
-
9. Re: SEAM event for "validation failed"
hantsy Oct 12, 2011 7:52 PM (in response to captainvoid)I replaced the catch with solder in pom.xml when upgraded to 3.1.0.Beta3