Re: Qualifying a DisplayGroup in WOO

2020-10-12 Thread Don Lindsay via Webobjects-dev
Thanks

> On Oct 12, 2020, at 10:45, Hugi Thordarson via Webobjects-dev 
>  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 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hello, I apologize if this is a duplicate, I recently re-subscribed because 
>> my old 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 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 
>> )
>> Help/Unsubscribe/Update your Subscription:
>> 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


Re: Qualifying a DisplayGroup in WOO

2020-10-12 Thread Hugi Thordarson via Webobjects-dev
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 
>  wrote:
> 
> Hello, I apologize if this is a duplicate, I recently re-subscribed because 
> my old 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 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)
> Help/Unsubscribe/Update your Subscription:
> 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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Qualifying a DisplayGroup in WOO

2020-10-12 Thread Don Lindsay via Webobjects-dev
Hello, I apologize if this is a duplicate, I recently re-subscribed because my 
old 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 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)
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


D2W Wonder with multiple EOModels

2020-10-12 Thread Don Lindsay via Webobjects-dev
Hello, I apologize if this is a duplicate my apple lists account appeared to be 
messed up so I resubscribed;

I have a D2W application with two EOModels that connect to two different 
databases.EOF works correctly to pull the data for both models, I turned on 
EOF debugging and I see records being returned when the entries are selected 
and queried.  For example:  ( I removed some of the columns text to make it 
easier to read)

Oct 11 21:04:52 mozaic[5001] DEBUG NSLog  -  === Begin Internal Transaction
Oct 11 21:04:52 mozaic[5001] DEBUG NSLog  -  evaluateExpression: 

Oct 11 21:04:52 mozaic[5001] DEBUG NSLog  - 412 row(s) processed


The task is LIST.

For any entity in the first EOModel the list template works fine and data is 
listed in the page.
For any entity in the second EOModel the list template loads but says there are 
no records.  But as you can see above, 412 records have been returned from the 
database for ITABYY and when it is selected and searched with no criteria 
nothing displays in the list page.   Every entity in the second EOModel will 
not display in the list template.

If I query the EOF directly I get all the records back that I would respect.

Have I missed a step when using multiple Models?

Thanks,

Don



 ___
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