• 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: D2W app date field is required ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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();
}



Markus Ruggiero
email@hidden
Check out the new book about Project Wonder and WebObjects on http://learningthewonders.com/


 _______________________________________________
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

  • Prev by Date: WOSession.SessionDidTimeOutNotification oddity (was: app closing method)
  • Next by Date: Re: WOSession.SessionDidTimeOutNotification oddity (was: app closing method)
  • Previous by thread: Re: WOSession.SessionDidTimeOutNotification oddity (was: app closing method)
  • Next by thread: Yosemite
  • Index(es):
    • Date
    • Thread