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 PROTECTED]
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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]