Hi all,

I'm using the instructions here: 
http://wiki.objectstyle.org/confluence/display/WO/D2W+Flow+Control to add a 
function to my D2W listing page that will create and Excel file of the objects 
listed. It works great, but I'm not comfortable with how I'm getting the 
EODataSource from the existing page. Here's how I'm doing it now:

    // "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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to