Re: ERModernDirectToWeb question

David Holt <[email protected]> Tue, 22 Feb 2011 09:21:42 -0800
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
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


On 2011-02-22, at 8:34 AM, Paul Halliday wrote:

> Hi
> 
> 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
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev

_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev