• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Passing D2W Listing Component Datasource to another component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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,

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Passing D2W Listing Component Datasource to another component
      • From: Ramsey Gurley <email@hidden>
  • Prev by Date: Current wod definition name?
  • Next by Date: Re: Current wod definition name?
  • Previous by thread: Re: Current wod definition name?
  • Next by thread: Re: Passing D2W Listing Component Datasource to another component
  • Index(es):
    • Date
    • Thread