Re: Webobjects-dev Digest, Vol 5, Issue 479
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.
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