• 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
Qualifying a DisplayGroup in WOO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Qualifying a DisplayGroup in WOO


  • Subject: Qualifying a DisplayGroup in WOO
  • From: Don Lindsay via Webobjects-dev <email@hidden>
  • Date: Thu, 24 Sep 2020 12:35:59 -0500

Hello;

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: WOLips bugfixes and new features planning
  • Previous by thread: Re: WOLips bugfixes and new features planning
  • Index(es):
    • Date
    • Thread