• 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: Setting a Default toOne Relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a Default toOne Relationship


  • Subject: Re: Setting a Default toOne Relationship
  • From: David Avendasora <email@hidden>
  • Date: Mon, 28 Aug 2006 16:30:56 -0400

I finally had a chance to come back to this issue and Ken, you are absolutely right. The server-side class is not instantiated and therefor awakeFromInsertion() isn't called until you click "Save" on the client. Which completely contradicts Apple's Java Client documentation, but now that I think about it, only makes sense.

Now, shouldn't the client-side class be instantiated as soon as you click the "New" button? It doesn't appear to be, or maybe EOGenericRecord is getting instantiated instead of my custom class?

Any ideas?

Thanks,

Dave

On May 19, 2006, at 5:48 AM, Ken Anderson wrote:


On May 19, 2006, at 5:25 AM, David Avendasora wrote:


On May 19, 2006, at 9:45 AM, Paul Lynch wrote:


On 19 May 2006, at 09:35, David Avendasora wrote:

I've been following the instructions in the WebObjects Java Client Programming manual (http://developer.apple.com/ documentation/WebObjects/DesktopApplications/WODesktopApps.pdf) for "Enhancing the Application" in which it describes several ways to modify a Direct To Java Client application. In the instructions for setting initial values (page 123), the example code is put in the awakeFromInsertion(EOEditingContext) method in the server-side class. I was putting it in the client-side, but I've now generated server side classes, added it to the Application Server target and put the code there and even changed it to simply put a default value in one of the attributes instead of setting a relationship, but it still doesn't work.

My understanding is that it belongs in the server side class, not the client side. You should also really be developing server side classes in general before client side, as that is where most of the logic belongs.

As I stated above, it is now in the server side, AND I simplified it to match the documentation's example. Still, it doesn't work.

David,

I would guess that the object won't actually get inserted into the context on the server side until you try to save. I could be wrong, since I've never done Java client work before, but that's what I would suspect. Can you confirm or deny this?

I suggest doing some experiments saving the object to see when awakeFromInsertion() gets called on the server side...

Ken





_______________________________________________ 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: Direct to Java Client and WOLips
  • Next by Date: Re: Looks like ThinkSecret got some of the scoop on WO from WWDC'06
  • Previous by thread: Re: A newbie feeling about WO Developpers state of mind…
  • Next by thread: Re: Setting a Default toOne Relationship
  • Index(es):
    • Date
    • Thread