Am 13.04.2012 um 11:34 schrieb Theodore Petrosky: > I don't even know where to begin. I have a D2W app that manages Briefs. A > Brief is created by a User. (one to one relation) > > I can easily create a tab that calls a method to limit the resultant list to > only those Briefs created by the current User. However, where do I 'fix' the > search area. > > I mean if the current User is Sally, she will search for Brief(s) that the > Objective attribute contains the word 'Iceman'. But I want all queries to > include 'and user = 'Sally'.
You can add restricting qualifiers (almost) globally via "editingContextShouldFetchObjects" in ERXEditingContextDelegate. Just create your own EC delegate and use it to modify the fetch spec. To define your custom delegate as the default delegate: new ERXEC.DefaultFactory() .setDefaultEditingContextDelegate(new DREditingContextDelegate()); > Sally should not see Bob's Briefs. I am trying to embrace D2W, and (for me) > this would be trivial in a Wonder app. For D2W you can subclass EODatabaseDataSource and modify the constructors and the "setFetchSpecification" method to ensure restrictions are applied. To make sure your subclass gets used you can implement "ERDQueryDataSourceDelegateInterface" and set it via the rules. Using only the queryDataSourceDelegate may also be sufficient depending on your needs. cheers, Fabian > Is there a property for this? > > Ted > _______________________________________________ > 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/lists.fabian%40e-lumo.com > > This email sent to lists.fab...@e-lumo.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