Re: D2W app date field is required ???
Re: D2W app date field is required ???
- Subject: Re: D2W app date field is required ???
- From: Philippe Rabier <email@hidden>
- Date: Tue, 05 Aug 2014 11:06:22 +0200
I would add to (almost) always call super.validateForSave() first.
All your mandatory attributes are tested so you don’t need to write: if (myAttribute() != null) { // check some stuff }
Your mandatory attributes can’t be null after super.validateForSave().
There are some rare circumstances where you write your own code before (like checking invisible attributes for example).
Philippe --------------------- http://twitter.com/prabier
On 23 juil. 2014, at 15:58, Markus Ruggiero <email@hidden> wrote: On 23.07.2014, at 14:36, Theodore Petrosky < email@hidden> wrote: that’s what it was. I didn’t call super.validateForSave in the validate method. Interesting that the string fields function without the super call.
BTW, is there an example of the correct signature for validateForSave. I am googling and can’t seem to find an example of what it should look like
Let Eclipse show you. Type validateforsa <ctrl-space> and you're good to go
@Override public void validateForSave() throws ValidationException { // TODO Auto-generated method stub super.validateForSave(); }
|
_______________________________________________
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