• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
validationFailedWithException question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: validationFailedWithException question
      • From: Kieran Kelleher <email@hidden>
    • Re: validationFailedWithException question
      • From: Marius Soutier <email@hidden>
  • Prev by Date: Re: Finding WO people for startups (cult of the dead)
  • Next by Date: Re: validationFailedWithException question
  • Previous by thread: Re: Finding WO people for startups (cult of the dead)
  • Next by thread: Re: validationFailedWithException question
  • Index(es):
    • Date
    • Thread