• 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: Webobjects-dev Digest, Vol 5, Issue 479
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Webobjects-dev Digest, Vol 5, Issue 479


  • Subject: Re: Webobjects-dev Digest, Vol 5, Issue 479
  • From: Daniel Mejia <email@hidden>
  • Date: Tue, 29 Apr 2008 22:40:59 -0500

Cuauhtemoc,

You can initialize attribute overriding the awakeFromInsertion method of your enterprise objects.

Something like this:

public void awakeFromInsertion(EOEditingContext context) { 
super.awakeFromInsertion(context); 
if (creationDate() == null) { 
setCreationDate(new NSTimestamp()); 
} 
} 

I copied this fragment of code from the "WebObjects Enterprise Objects Programming Guide".

Saludos,

Daniel.
 


On Apr 29, 2008, at 9:49 PM, email@hidden wrote:

Hi All,
Does someone know how can I initialize an attribute when creating a new object in a D2W edit page?
Is there a rule I can add for that?

-- 
Atentamente, Cuauhtemoc Hohman

 _______________________________________________
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: Re: Unable to release locks when using MultiECLockManager
  • Next by Date: Mapping Advanced Oracle DataType
  • Previous by thread: Initialization in a D2W Edit Page
  • Next by thread: Mapping Advanced Oracle DataType
  • Index(es):
    • Date
    • Thread