validationFailedWithException not called for relationships
validationFailedWithException not called for relationships
- Subject: validationFailedWithException not called for relationships
- From: Guido Neitzer <email@hidden>
- Date: Sat, 3 Jun 2006 06:07:41 +0200
Hi.
I'm a little bit baffled by the behaviour of my app ...
I have a simple object with a couple of mandatory attributes
(properties and relationships). In my component I have the method
public void validationFailedWithException (
java.lang.Throwable exception,
java.lang.Object value,
java.lang.String keyPath) {
// do some things
}
This method is called for each non-relationship property that failed
the validation. So far so good, but it is NOT called for the not set
mandatory relationships.
I'm using Wonder, my eo is in a child editing context. An exception
is thrown:
<er.extensions.ERXValidationException object:
<bnr.projectcenter.eo.Project pk:"null">; propertyKey: client; type:
MandatoryToOneRelationshipException; additionalExceptions: (<er.e
xtensions.ERXValidationException object:
<bnr.projectcenter.eo.Project pk:"null">; propertyKey: createdBy;
type: MandatoryToOneRelationshipException; additionalExceptions: ()>)>
at com.webobjects.eoaccess.EORelationship.validateValue
(EORelationship.java:1805)
at
com.webobjects.eoaccess.EOEntityClassDescription.validateValueForKey
(EOEntityClassDescription.java:443)
at er.extensions.ERXEntityClassDescription.validateValueForKey
(ERXEntityClassDescription.java:762)
at com.webobjects.eocontrol.EOCustomObject.validateValueForKey
(EOCustomObject.java:1339)
at er.extensions.ERXGenericRecord.validateValueForKey
(ERXGenericRecord.java:574)
at com.webobjects.eocontrol.EOCustomObject.validateForSave
(EOCustomObject.java:1411)
at er.extensions.ERXGenericRecord.validateForSave
(ERXGenericRecord.java:610)
at projectcenter.extensions.PageLevelEditComponent.saveChanges
(PageLevelEditComponent.java:47)
in line 47 in the component I do a validateForSave on the eo.
What can be the reason for that? Any hint?
cug
--
PharmaLine, Essen, GERMANY
Software and Database Development
_______________________________________________
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