validationFailedWithException question
validationFailedWithException question
- Subject: validationFailedWithException question
- From: Pascal Robert <email@hidden>
- Date: Tue, 04 Oct 2011 08:23:54 -0400
I guess working with REST and calendars made my brain to forget how to do things with stateful components... I need to trap validation exceptions when required attributes are missing and ec.saveChanges() is called, so in my superclass for my components, I did:
public void validationFailedWithException(Throwable exception, Object value, String keyPath) { super.validationFailedWithException(exception, value, keyPath); ((Session)session()).addError(exception.getMessage()); } And I made a component to display the errors if session.errors() is not empty. Problem is: when saveChanges is called, I'm getting the generic exceptions page instead of my page with the ErrorsDisplay component. With the debugger, I do see that I go into validationFailedWithException, so I'm a bit lost of why I'm getting the generic exceptions page.
What I'm doing wrong?
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden