• 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
Re: validationFailedWithException not being called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: validationFailedWithException not being called


  • Subject: Re: validationFailedWithException not being called
  • From: Janine Sisk <email@hidden>
  • Date: Thu, 7 Jun 2007 14:41:24 -0700

Ok, just so this makes sense in the archives, and I make sure I understand what you're telling me:

The WOFileUpload is bound to imageData, an instance variable, instead of bigImage, an EO attribute, to avoid wiping out the value of bigImage in the situation where the user is editing a record and doesn't upload a new image.  So we bind the value to imageData and then setIimageData sets bigImage to the new value if it's not empty.

So what Chuck is suggesting, if I am understanding him correctly, is to replace the current line

displayBoard().setBigImage(imageData);

in setImageData with 

displayBoard().validateTakeValueForKey(data, "bigImage");

which will do the assignment and also cause validateBigImage to be called before we get to saveChanges, which will then cause validationFailedWithException to run.

Did I get that right?

janine

On Jun 7, 2007, at 2:27 PM, Chuck Hill wrote:


On Jun 7, 2007, at 2:24 PM, Janine Sisk wrote:

BigImage : WOFileUpload {
mimeType = displayBoard.mimeType;
data = "">

OK _that_ is not going to validate during takeValues by itself.  displayBoard.bigImage will.  IIRC, you want

public void setImageData(NSData data) {
    if (data != null) {
        displayBoard().validateTakeValueForKey(data, "bigImage"); // not sure about attribute name
    }
}

 _______________________________________________
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 not being called
      • From: Chuck Hill <email@hidden>
References: 
 >validationFailedWithException not being called (From: Janine Sisk <email@hidden>)
 >Re: validationFailedWithException not being called (From: Chuck Hill <email@hidden>)
 >Re: validationFailedWithException not being called (From: Janine Sisk <email@hidden>)
 >Re: validationFailedWithException not being called (From: Chuck Hill <email@hidden>)
 >Re: validationFailedWithException not being called (From: Janine Sisk <email@hidden>)
 >Re: validationFailedWithException not being called (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: validationFailedWithException not being called
  • Next by Date: Re: validationFailedWithException not being called
  • Previous by thread: Re: validationFailedWithException not being called
  • Next by thread: Re: validationFailedWithException not being called
  • Index(es):
    • Date
    • Thread