• 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: Validating in a subcomponent (reusable component)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validating in a subcomponent (reusable component)


  • Subject: Re: Validating in a subcomponent (reusable component)
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 10 Oct 2003 11:25:37 -0700
  • Organization: Global Village Consulting, Inc.

Arturo Pirez wrote:


On Friday, October 10, 2003, at 01:57 PM, Chuck Hill wrote:
Arturo Pirez wrote:

I'm seeing strange behavior if I throw a NSValidation.ValidationException from a subcomponent/reusable component.

What sort of strange behavior? Which phase is it being throw from?


Essentially the exception seems to go nowhere. I see the exception logged to the console but the parent never seems to get it. That
> log statement thats output is not in my code; i.e. seems to be in
the bowels of the framework(s) somewhere. The parent's validationFailedWithException never gets called.
>
I'd guess that is getting called on the sub-component. Try overriding that on the sub-component to pass the message onto its parent().


On
the other hand the request/response loop does seem to stop when the exception is thrown. So, for example,
the subcomponent can display an error message and changes to objects don't seem to be recorded.


I'm not sure what is happening there.


Does anyone know if subcomponents can use that mechanism to report errors? Or is that an unsupported paradigm?

I'd think that they are only handled during the takeValues phase.

Is the subcomponent's takeValues() (for lack of better terminology) a nested loop within the parent's takeValues()?
Yes.


Shouldn't that be where the validation logic happens? I guess I'm not really understanding what you're saying above.

Yes. I was more asking if you were throwing the exception while invoking an action or creating the response. Throwing an exception there could be expected to have a very different result. :-)


Chuck

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net

Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Validating in a subcomponent (reusable component)
      • From: Arturo Pérez <email@hidden>
References: 
 >Re: Validating in a subcomponent (reusable component) (From: Arturo Pérez <email@hidden>)

  • Prev by Date: Re: Validating in a subcomponent (reusable component)
  • Next by Date: Re: Validating in a subcomponent (reusable component)
  • Previous by thread: Re: Validating in a subcomponent (reusable component)
  • Next by thread: Re: Validating in a subcomponent (reusable component)
  • Index(es):
    • Date
    • Thread