• 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
Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder


  • Subject: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • From: David Holt <email@hidden>
  • Date: Fri, 7 Apr 2006 11:38:28 -0700

Hi all,

I use a displayGroup component to update information about a meeting. 

I also have a display only component that uses a WORepetition to display meeting information for meetings that a user is scheduled to attend. I have always just bound to the meetings list using "session.user.meetings" which gives the meetings that the logged in user can see. The problem with this is that the data that gets updated in the DisplayGroup component does not show up immediately in the user's list of meetings (for example if they add one). I am trying to implement Chuck's fetching fresh objects code from Practical WebObjects, but that requires an EOFetchSpecification and I am not sure how to recreate what WOBuilder does for me automatically. How do I use the session as a qualifier for the user that I want to access, and then how do I tell the user to refetch the meetings objects? The code from Chuck's book looks like this (the fetchSpec code) but is incomplete because it doesn't take into account the session:


    /** @TypeInfo Meeting */
    public NSArray meetingsRepetition()
    {
        return meetingsRepetition;
    }
    public void setMeetingsRepetition(NSArray newMeetingsRepetition)
    {
        EOFetchSpecification fetchSpec = new EOFetchSpecification();
fetchSpec.setEntityName("ApplicationUser");
fetchSpec.setRefreshesRefetchedObjects(true);
fetchSpec.setPrefetchingRelationshipKeyPaths(new NSArray("meetings"));
meetingsRepetition = editingContext().objectsWithFetchSpecification(fetchSpec);
// meetingsRepetition = newMeetingsRepetition;
    }

Any pointers would be much appreciated. Thanks,

David
 _______________________________________________
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: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: New java class
  • Next by Date: Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • Previous by thread: Re: MySQL EOModeler connection problems
  • Next by thread: Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • Index(es):
    • Date
    • Thread