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 |