• 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
Urgent: Writing in a shared editingcontext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Urgent: Writing in a shared editingcontext


  • Subject: Urgent: Writing in a shared editingcontext
  • From: "Greg Liebowitz" <email@hidden>
  • Date: Sun, 29 Feb 2004 21:57:16 -0500

Hi,

I'm looking for some help with writing in a shared editing context.  I know
they are read-only... so any workaround would be good.  Here are some snippets
of the code:

Session class:

 protected EOEditingContext editingEc;


Application Class:

 public Application() {
        super();

        fetchSharedObjects();
    }


    public void fetchSharedObjects() {
        EOEditingContext sharedContext;
        sharedContext = sharedEditingContext();

        EOFetchSpecification fs = new EOFetchSpecification("Team", null,
null);
        allTeamsReadOnly = sharedContext.objectsWithFetchSpecification(fs);
        fs = new EOFetchSpecification("Match", null, null);
        allMatchesReadOnly = sharedContext.objectsWithFetchSpecification(fs);
        fs = new EOFetchSpecification("Location", null, null);
    }



Web component TIDTeam:

 public TIDTeam(WOContext context) {
        super(context);

        ((Session)session()).editingEc = new EOEditingContext();
        ((Session)session()).editingEc.setSharedEditingContext(null);
    }


I can then access the EC using ((Session)session()).editingEc

This works fine for TIDTeam - writing to the "Team" table, but I have another
component TIDMatch which writes to the "Match" table.

Of course, when I use TIDMatch, it results with:
java.lang.IllegalArgumentException: Attempt to change object {values = .....
in a shared editing context

Please help!

Thank you,
Greg Liebowitz
_______________________________________________
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.


  • Prev by Date: Packages in Eclipse....
  • Next by Date: Re: Packages in Eclipse....
  • Previous by thread: Re: Strange Error
  • Index(es):
    • Date
    • Thread