Re: editingContext.refaultObjects();
Re: editingContext.refaultObjects();
- Subject: Re: editingContext.refaultObjects();
- From: Michael Parlee <email@hidden>
- Date: Thu, 26 Aug 2004 10:02:21 -0700
It's pretty daunting stuff at first. Especially if you don't know
Java. I actually found that using D2W, though a struggle at first,
helped me understand WebObjects better.
Anyway. Check out the D2WInspectPage in the WebObject API
documentation
(http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/directtoweb/D2WInspectPage.html).
There is an accessor method called object() that will return the object
that your inspect page is editing.
So the code will literally be:
EOEditingContext.refreshObject(object());
Mike
On Aug 26, 2004, at 9:28 AM, Justin Tocci wrote:
Sorry, I'm really sketchy on java. I'm trying to use something like
that, but I'm lost as to how to find the object to stick into the
method. I want the object that is going to be commited as a result of
the saveChanges() method. Do you know a way to get the object(s) that
would react to the saveChanges() method?
I think my code needs to look something like:
editingContext.itemsThatAreWaitingToSave(EOEnterpriseObject object);
EOEditingContext.saveChanges();
EOEditingContext.refreshObject(object)
justin
On Aug 26, 2004, at 11:23 AM, Michael Parlee wrote:
Try editingContext.refreshObject(yourObject).
On Aug 26, 2004, at 8:33 AM, Justin Tocci wrote:
I'm calling editingContext.refaultObjects(); right after
editingContext.saveChanges(); and I'm getting the behavior I need. A
change is commited to the database with saveChanges(), immediately
the editingContext is sent refaultObjects() and so queries the
database for the record it just saved. The good thing is that this is
picking up my new "last updated" date in the change_stamp column and
I can immediately make another change to the same column without
error.
Problem is I think it is refaulting all objects in the editing
context, not just the one that was saved, because I'm getting a lot
of activity in the SQL log. Anyone got any ideas on how to just
refault the specific object that was saved?
Thanks for all the help guys. Anyone with Postgresql or Access issues
don't hesitate to drop me a line.
justin tocci
fort wayne, in
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.