• 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: Default values for new objects d2w
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default values for new objects d2w


  • Subject: Re: Default values for new objects d2w
  • From: Anjo Krank <email@hidden>
  • Date: Mon, 14 Sep 2009 13:24:31 +0200

Depends on whatcha wanna do. Normally, one needs to set the current user, set the creation date and so forth. If you want that, you could override ERXGenericRecord.init() and get the user from Thread storage where you previously put it in session.awake(). Look at the bug tracker example on how to do that.

If you *really* want default values calculated by rules, this is also possible, but I'd strongly recommend against it and won't say anything until you make a good case for you needing it :)

Cheers, Anjo



Am 14.09.2009 um 13:16 schrieb Freddie Tilley:

Is there a way to assign default values to newly generated objects using the rule system in d2w?
To be more specific to auto-assign a relationship when creating an object?


After a quick google I found the following answer:

http://osdir.com/ml/web.webobjects.devel/2002-04/msg00926.html

But since the post is quite old, I was wondering if there was an easier way

--
Freddie Tilley
_______________________________________________
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

_______________________________________________ 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
  • Follow-Ups:
    • Re: Default values for new objects d2w
      • From: David Avendasora <email@hidden>
    • Re: Default values for new objects d2w
      • From: Freddie Tilley <email@hidden>
References: 
 >Default values for new objects d2w (From: Freddie Tilley <email@hidden>)

  • Prev by Date: Default values for new objects d2w
  • Next by Date: Re: Default values for new objects d2w
  • Previous by thread: Default values for new objects d2w
  • Next by thread: Re: Default values for new objects d2w
  • Index(es):
    • Date
    • Thread