Jaw drops! 

Thanks. As many times as I've looked at the javadoc
for ec's this is one method I hadn't noticed. It certainly is in line
with what my question was about. 

Tom 

't Wed, 1 Feb 2012 18:31:43
+0100, Fabian Peters wrote: 

> Hi Tom,
> 
> maybe 
> 
>
ec.setStopsValidationAfterFirstError(false);
> 
> is what you're looking
for?
> 
> Fabian
> 
> Am 01.02.2012 um 17:38 schrieb Dr. Wo:
> 
>> I'm
curious to know whether what I am doing is recommended practice for
validating multiple EOs attached to a form and, not incidentally,
whether I understand how validation is intended to work. I have a form
that has fields that are linked to multiple EOs, one of which is the
"principal" entity, the others being related to it. (However, the
situation I describe would arise even if there are no relationships
among the entities.) It seems that when I invoke save and the EOs are
validated, the first one that throws a validation exception terminates
the validation process such that any remaining EOs will not be
validated. Simply put, from the user's perspective not all invalid data
will be caught. The way I handle this problem is to have an editing
context delegate perform the validation via
editingContextShouldValidateChanges. Before returning false from this
method I take over the validation process by validating all the updated
EOs in the EC and I throw an aggregate validation exception if needed. I
use the methods in ERXEntityClassDescription to perform the validation.
Is this a recommended method, or is there a preferred alternative? And
in any case, do I understand the process correctly? Thanks Tom
_______________________________________________ Do not post admin
requests to the list. They will be ignored. Webobjects-dev mailing list
([email protected] [1]) Help/Unsubscribe/Update your
Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
[2] This email sent to [email protected] [3]

 


Links:
------
[1] mailto:[email protected]
[2]
https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
[3]
mailto:[email protected]
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to