• 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
Re: Passing D2W Listing Component Datasource to another component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing D2W Listing Component Datasource to another component


  • Subject: Re: Passing D2W Listing Component Datasource to another component
  • From: Ramsey Gurley <email@hidden>
  • Date: Fri, 8 Oct 2010 15:12:27 -0400

NSKeyValueCodingAdditions.Utility.valueForKeyPath(lpi, "displayGroup.dataSource");

Or you could use ERD2WUtilities.enclosingPageOfClass(sender, ERDListPageInterface.class) so you can just call displayGroup() directly.

Ramsey

On Oct 8, 2010, at 2:59 PM, David Avendasora wrote:

Hi Ramsey!

Okay, so how do I get the EODataSource from the resulting ListPageInterface?

Dave

On Oct 8, 2010, at 2:12 PM, Ramsey Gurley wrote:

ERD2WUtilities.parentListPage(sender) should give you the next list page up for the sender even if the sender is nested.

Ramsey

On Oct 8, 2010, at 1:56 PM, David Avendasora wrote:

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: .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



_______________________________________________ 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
References: 
 >Passing D2W Listing Component Datasource to another component (From: David Avendasora <email@hidden>)
 >Re: Passing D2W Listing Component Datasource to another component (From: Ramsey Gurley <email@hidden>)
 >Re: Passing D2W Listing Component Datasource to another component (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: Passing D2W Listing Component Datasource to another component
  • Next by Date: Eclipse, WO, and JNI
  • Previous by thread: Re: Passing D2W Listing Component Datasource to another component
  • Next by thread: Eclipse, WO, and JNI
  • Index(es):
    • Date
    • Thread