Hi Paul,
Yes. There are a couple of different ways to do that but I think that the easiest to keep track of is to use a ERDQueryDataSourceDelegateInterface. Ramsey has made extensive notes about that on the wiki: http://wiki.objectstyle.org/confluence/display/WO/D2W+Flow+Control
Here's a simple example I use to make sure that any documents returned by a query are qualified by the working group of the person who is logged in:
private EOQualifier qualifierFromSender(ERD2WQueryPage sender) {
WorkingGroup wg = WorkingGroup.wg();
EOQualifier q = Document.WORKING_GROUP.eq(wg).and(sender.qualifier());
return q;
}
And the corresponding rule: 100 : (pageConfiguration = 'QueryEmbeddedDocument' or pageConfiguration = 'QueryNormalDocument') => queryDataSourceDelegate = "my.app.delegates.WorkingGroupDocumentsQueryDataSourceDelegate" [er.directtoweb.ERDDelayedObjectCreationAssignment]
David
Post by Paul HallidayHi
I have a WOLips Project which is leveraging ERModernDirectToWeb. Can I prequalify a dataset for an entity query page? To clarify -- I want to use the power of the Query Page but only search against a predetermined fetch datasource.
Kind regards
Paul Halliday
_______________________________________________
WebObjects-dev mailing list
http://www.omnigroup.com/mailman/listinfo/webobjects-dev