Re: limiting All Queries in D2W

2015-01-30 Thread Fabian Peters
Those methods may get called too early. I'd suggest you just write a method that returns the relationship candidates. When that method is being called and a person is still not set, then we'll have another look. Fabian Am 30.01.2015 um 16:01 schrieb Theodore Petrosky : > actually I am looking

Re: limiting All Queries in D2W

2015-01-30 Thread Theodore Petrosky
BTW here is the method that is called when you click the New button: /** * Performs the newObjectAction. Creates a new object and sets the inline task * to 'create' */ public WOComponent newObjectAction() { EOEditingContext newEc = ERXE

Re: limiting All Queries in D2W

2015-01-30 Thread Theodore Petrosky
actually I am looking at that now. I created in my BookPerson EO: @Override public void awakeFromInsertion(EOEditingContext editingContext) { // TODO Auto-generated method stub super.awakeFromInsertion(editingContext);

Re: limiting All Queries in D2W

2015-01-30 Thread Fabian Peters
Well, I'm not sure about your model, but: If editing a Person and clicking on the book relations "new" button, I would expect the created Book object to have its "person" relationship be set to the person EO you're editing. If the EO is inaccessible, then you can alway resort to storing it on th

Re: limiting All Queries in D2W

2015-01-30 Thread Theodore Petrosky
Ok, maybe using the restrictedChoiceKey option and put a method on the EO that returns an array of these objects. But how do I pass in either the Person EO that I am editing, or an array of (in this case) “Person.Shows" that are assigned to this Person? Obviously, if I can pass in the Person, I

Re: limiting All Queries in D2W

2015-01-29 Thread Fabian Peters
Hi Ted, The most basic rule would be: 100 : entity.name like '*' => queryDataSourceDelegate = "COM.YOUR-PACKAGE.LimitBooksToPersonDataSourceDelegate" [ERDDelayedObjectCreationAssignment] But if you want to limit the choices in a relationship component, the "restrictedChoiceKey" approach shoul

Re: limiting All Queries in D2W

2015-01-29 Thread Theodore Petrosky
Fabian, You commented on this a long time ago. and in checking my old emails, I see this is along the lines of what I need. I have a D2W app with an embedded toMany CreateEmbeddedBookPerson that has an ERD2WEditToOneRelationship that I am trying to create a fetch specification for. I see in th

Re: limiting All Queries in D2W

2012-04-13 Thread Anjo Krank
Much easier to use: => extraRestrictingQualifier = { "band" = "session.user.band"; } [ERDDelayedExtraQualifierAssignment] QueryPage: public EODataSource queryDataSource() { EODataSource ds = null; if(ds == null) { ds = super.queryDataSource(); }

Re: limiting All Queries in D2W

2012-04-13 Thread David LeBer
Ted, You can look at restrictingFetchSpecification for your list pages, or queryDataSourceDelegate to restrict in the query. For the latter here is an example from one our our apps. 100 : (entity.name = 'Song' and session.currentUser.isAdmin = 0) => queryDataSourceDelegate = "com.alignsoft.rd

Re: limiting All Queries in D2W

2012-04-13 Thread Fabian Peters
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

limiting All Queries in D2W

2012-04-13 Thread 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 m