Re: Linking Query to List within an One-Many
Re: Linking Query to List within an One-Many
- Subject: Re: Linking Query to List within an One-Many
- From: Ramsey Gurley <email@hidden>
- Date: Thu, 18 Dec 2014 09:41:11 -0700
If you are setting up a custom page template with embedded d2w, then you can set up the qualifier as you need. Your WOD will probably look something like
QueryComponent: ERXD2WQuery {
action = queryAction;
entityName = entity.name;
queryDataSource = queryDataSource;
}
ListComponent: ERXD2WList {
dataSource = queryDataSource;
entityName = entity.name;
pageConfiguration = listConfigurationName;
}
Maybe an EODatabaseDataSource where you qualifyWithRelationshipKey to set up your Order —>> OrderItem relationship, then let the query component set the queryBindings as usual. queryAction can probably just return null.
MyPage page = pageWithName(MyPage.class);
page.setSourceObject(obj);
return page;
public void setSourceObject(Order obj) {
queryDataSource().qualifyWithRelationshipKey(Order.ORDER_ITEMS_KEY, obj);
}
Something like that..
On Dec 18, 2014, at 8:58 AM, James Cicenia <email@hidden> wrote:
> Here is the scenario:
>
> I am creating a custom Query/List page using D2WQuery and D2WList.
>
> The page will always be repopulated. In this case an Order —>> OrderItems.
>
> I want the query page to control what shows in the List. What is the best way to do this?
>
> Create a specific ERDQueryDataSourceDelegateInterface object and rule to add a prequalifier?
> or
> Can I just pass the WODisplayGroup my array of items?
> or?
>
>
>
> Wondering
> James
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden