Running validation manually
Running validation manually
- Subject: Running validation manually
- From: Mark Wardle <email@hidden>
- Date: Thu, 7 Jan 2010 00:04:00 +0000
Hi all,
I have entities that can be one of three states: i) valid, ii)
warnings, iii) invalid
If an entity fails EOF validation then it must be (iii)
There is entity-specific logic to decide whether there are warnings
(that can be overridden and ignored with a tick of a checkbox)
I naively did this:
public Status formStatus() {
try {
validateForSave();
}
catch (ValidationException e) {
return Status.INCOMPLETE;
}
if (formWarnings()==true) return Status.WARNINGS;
return Status.COMPLETE;
}
So that I can easily display a little graphic in the UI if a form is
created (and is incomplete) or has warnings, or is valid.
Unfortunately this naive solution does not work as it appears my
application locks in validateForSave(). No warnings or errors.
Is there a way of asking EOF to validate an entity at will at any
point in the R-R loop?
Using Wonder with WO5.4, so if there's something clever in Wonder I
don't know about then all hints appreciated!
Thank you,
Mark
--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
_______________________________________________
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