On 02/01/2009, at 12:03 PM, Theodore Petrosky wrote:

ok... I am experimenting with the ajax examples and I added the UpdateDisplayGroup to my app (with alterations). I am populating the list with a db query:

categoryList = Category.fetchAllCategories(ERXEC.newEditingContext(), sortOrderings);

EOEditingContext ec = ERXEC.newEditingContext();
categoryList = Category.fetchAllCategories(ec, sortOrderings);

then:

dg = new WODisplayGroup();
dg.setObjectArray(categoryList);
dg.setNumberOfObjectsPerBatch(20);

I want to access the editingContext and save the changes from the save dialog. What I want is something like this in the save function:

dg.selectedObject().editingContext().saveChanges();

ec.saveChanges();

I am at a loss as to how to access the editingContext when I use ERXEC.newEditingContext().

Assigning it to a local variable will certainly give you access to the EC you're passing to fetchAllCategories() above. Does that solve your problem?


--
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to