• 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
Re: D2W: QueryAllPage?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: D2W: QueryAllPage?


  • Subject: Re: D2W: QueryAllPage?
  • From: Anjo Krank <email@hidden>
  • Date: Fri, 23 Apr 2004 19:34:25 +0200
  • Xx-reply-to: email@hidden

Am 23.04.2004 um 19:24 schrieb Ashley Aitken:


On 23/04/2004, at 10:13 PM, Anjo Krank wrote: Am 23.04.2004 um 15:55 schrieb Ashley Aitken:

Or some rule like:

(task like 'query*') and (entity.name = 'Entity1')
=>
auxiliaryQualifier = ...

This might work with a custom D2W factory and the ERDDelayedExtraQualifierAssignment. See the docs in the code for more info.

Or could a small change be made to ERD2WQueryEntitiesPage to include the code suggested in ERDDelayedExtraQualifierAssignment so that every entity in the ERD2WQueryEntitiesPage could possibly have an "extraRestrictingQualifier."

That would be possible, yes. Make that change and post it to the wonder-list, please. I'm not really using that page, you know:)


If this was also done for the "detailed" Query component/page (sorry I don't know the name - the expanded query), this could become a standard binding to effect all queries.

You mean the ERD2WQueryPage+subclasses. You'd add this:

public EODataSource queryDataSource() {
EODataSource ds = super.queryDataSource();
if (ds != null && (ds instanceof EODatabaseDataSource)) {
EOFetchSpecification fs = ((EODatabaseDataSource)ds).fetchSpecification();
EOQualifier q = fs.qualifier();
EOQualifier extraQualifier = (EOQualifier)d2wContext().valueForKey("extraRestrictingQualifier");


if(q != null && extraQualifier != null) {
q = new EOAndQualifier(new NSArray(new Object[] {q, extraQualifier}));
} else if(extraQualifier != null) {
q = extraQualifier;
}
fs.setQualifier(q);
}
return ds;
}


But this is a pretty severe change, so you might a) try it first and b) suggest it to the list first:)

Does that make sense? If so perhaps I will try it on a copy of the classes ...



PS The ERDDDDelayedConditionalAssignment worked brilliantly, although my dreams didn't come true, it didn't work in the list page (ie it didn't show either list or list and edit icons depending on the attribute). It is probably something I am doing wrong so I will keep trying.

Hm, if you are using the repetition classes, you should be able to set actions={...} accordingly to you needs instead of isEntityWhatEver.


Cheers, Anjo
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >D2W: QueryAllPage? (From: Ashley Aitken <email@hidden>)
 >Re: D2W: QueryAllPage? (From: Anjo Krank <email@hidden>)
 >Re: D2W: QueryAllPage? (From: Ashley Aitken <email@hidden>)
 >Re: D2W: QueryAllPage? (From: Anjo Krank <email@hidden>)
 >Re: D2W: QueryAllPage? (From: Ashley Aitken <email@hidden>)

  • Prev by Date: Re: D2W: QueryAllPage?
  • Next by Date: Re: Date calculation
  • Previous by thread: Re: D2W: QueryAllPage?
  • Next by thread: Date calculation
  • Index(es):
    • Date
    • Thread