Thanks > On Oct 12, 2020, at 10:45, Hugi Thordarson via Webobjects-dev > <webobjects-dev@lists.apple.com> wrote: > > Hi Don, > it's been ages since I've used DisplayGroups, but it does seem like you're > missing an invocation of qualifyDisplayGroup() (if you want to filter objects > already in the DG) or qualifyDataSource() (to perform an entirely new fetch) > on the DG to actually do anything with the qualifier you've set. > > Cheers, > - hugi > >> On 12 Oct 2020, at 15:36, Don Lindsay via Webobjects-dev >> <webobjects-dev@lists.apple.com <mailto:webobjects-dev@lists.apple.com>> >> wrote: >> >> Hello, I apologize if this is a duplicate, I recently re-subscribed because >> my old Mac.com <http://mac.com/> email address appears to intermittently >> reject messages; >> >> I want to apply a qualifier to an ERXDisplayGroup that is defined in WOO. I >> couldn’t figure out how to create a EOFetchSpecification with a qualifier in >> EOModeler that would take a value from the user’s session. The qualifier >> takes it’s value from a variable in the user’s session using a method in the >> component class. >> >> My ERXDisplayGroup is defined like this: >> >> { >> "WebObjects Release" = "WebObjects 5.0"; >> variables = { >> databaseDetailsDisplayGroup = { >> class = ERXDisplayGroup; >> dataSource = { >> class = EODatabaseDataSource; >> editingContext = "session.defaultEditingContext"; >> fetchSpecification = { >> class = EOFetchSpecification; >> entityName = Databasedetails; >> fetchLimit = 0; >> isDeep = YES; >> }; >> }; >> fetchesOnLoad = YES; >> formatForLikeQualifier = "%@*"; >> numberOfObjectsPerBatch = 10; >> selectsFirstObjectAfterFetch = YES; >> sortOrdering = ({class = EOSortOrdering; key = name; >> selectorName = "compareAscending:"; }); >> }; >> }; >> } >> >> In my component I have >> >> public NSArray<EOGenericRecord> getConnectorEntries() { >> databaseDetailsDisplayGroup.setQualifier(tenantSpec().qualifier()); >> return databaseDetailsDisplayGroup.filteredObjects(); >> } >> public EOFetchSpecification tenantSpec() { >> return ((Session)session()).tenantFetchSpecification(); >> } >> >> Session: >> >> public EOFetchSpecification tenantFetchSpecification() { >> EOFetchSpecification fetchSpecification = new EOFetchSpecification(); >> fetchSpecification.setQualifier(new >> EOKeyValueQualifier("tenant",EOQualifier.QualifierOperatorEqual,this.tenant)); >> return fetchSpecification; >> } >> >> >> And in my WOD I have >> >> RowRepetition: WORepetition { >> list = connectorEntries; >> item = currentItem; >> } >> >> The data never gets filtered by the Qualifier, it returns all objects with >> no filtering. >> >> What have I done wrong here, am I going at this the wrong way? >> >> Thanks in Advance >> >> Don >> >> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com >> <mailto:Webobjects-dev@lists.apple.com>) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is >> <https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is> >> >> This email sent to h...@karlmenn.is > > _______________________________________________ > 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: > https://lists.apple.com/mailman/options/webobjects-dev/pccdonl%40icloud.com > > This email sent to pccd...@icloud.com
_______________________________________________ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com