• 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: Esoteric issue with automatic property validation and validationFailedWithException()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Esoteric issue with automatic property validation and validationFailedWithException()


  • Subject: Re: Esoteric issue with automatic property validation and validationFailedWithException()
  • From: Paul Hoadley <email@hidden>
  • Date: Sun, 21 May 2017 16:16:44 +0930

Hi Aaron,

Thanks for jumping in.

On 21 May 2017, at 12:25 am, Aaron Rosenzweig <email@hidden> wrote:

After reading this a few times it is still not clear to me what the issue is but I’ll try to say something helpful.

Yeah, I think ultimately it’s esoteric, as advertised, and just not very interesting. But thanks for trying!

“takeValuesFromRequest()” does try to do some validation if it can figure out the key paths and figure out a “validate()” method to call.

What I’m talking about here is the validation that happens just _prior_ to that—what Chuck calls “Automatic EOF Property Validation” on p.143 of Practical WebObjects. My example triggers that because there are model attributes with allowsNull = N.

Obviously if it is just a method on the page it cannot “discover” validation methods to call because it doesn’t know the underlying logic or how to get to the EO that is covered by the custom WOComponent method. This type of “automatic” validation only can happen when you are setting a value hanging from an EO listed directly in the .wod

You may well be right, despite the fact that I think we’re talking about slightly different phases of validation. My observation is just that changing this:

<wo:text value="$^value"></wo:text>

to this:

<wo:text value="$value"></wo:text>

(even when paired with a setValue() method that calls setValueForBinding(value, "value”)) seems to _bypass_ the “Automatic EOF Property Validation” that happens in the first case above.

I’m almost boring myself talking about it now. I doubt there’s any bug, unless it’s in my code, I just thought someone else may have noted the inconsistency themselves, and could perhaps offer a workaround or something. But it’s not a big deal.


-- 
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 _______________________________________________
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

References: 
 >Esoteric issue with automatic property validation and validationFailedWithException() (From: Paul Hoadley <email@hidden>)
 >Re: Esoteric issue with automatic property validation and validationFailedWithException() (From: Chuck Hill <email@hidden>)
 >Re: Esoteric issue with automatic property validation and validationFailedWithException() (From: Paul Hoadley <email@hidden>)
 >Re: Esoteric issue with automatic property validation and validationFailedWithException() (From: Paul Hoadley <email@hidden>)
 >Re: Esoteric issue with automatic property validation and validationFailedWithException() (From: Aaron Rosenzweig <email@hidden>)

  • Prev by Date: Re: Compiling ERExtensions in Sierra no worky
  • Next by Date: Re: Compiling ERExtensions in Sierra no worky
  • Previous by thread: Re: Esoteric issue with automatic property validation and validationFailedWithException()
  • Next by thread: Looking for a 64 bit WOAdaptor for Apache 2.4
  • Index(es):
    • Date
    • Thread