Passing D2W Listing Component Datasource to another component
Passing D2W Listing Component Datasource to another component
- Subject: Passing D2W Listing Component Datasource to another component
- From: David Avendasora <email@hidden>
- Date: Fri, 8 Oct 2010 13:56:15 -0400
Hi all,
// "Export To Excel" public WOActionResults exportToExcel(WOComponent sender) { setSender(sender); ListPageInterface lpi = (ListPageInterface) D2W.factory() .pageForConfigurationNamed("ListExcelCCCommunicationIdentity", sender().session()); lpi.setDataSource((EODataSource) sender().parent() .valueForBinding("dataSource")); lpi.setNextPage(sender()); return (WOActionResults) lpi; }
the call to: sender().parent().valueForBinding("dataSource") seems wrong since it depends upon the parent of the ERDControllerButton to have the datasource, which is not always true.
What would be the proper way to get the dataSource?
Dave |
_______________________________________________
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