• 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
D2WList from hitting a link, no template, no frozen component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

D2WList from hitting a link, no template, no frozen component


  • Subject: D2WList from hitting a link, no template, no frozen component
  • From: Justin Tocci <email@hidden>
  • Date: Fri, 27 Aug 2004 09:06:38 -0500

I tried the code published with the article "The Best Kept Secret of The Best Kept Secret" at stepwise.com and couldn't cause a D2WList to be generated and come up with a list of data. I got it working but don't know if I'm doing anything wrong:

Hyperlink1: WOHyperlink {
	action = adminUsers;
}
--------------------------
import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.directtoweb.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;

public class Main extends WOComponent {

-snip-

public NSArray xwebuser() {
return EOUtilities.objectsForEntityNamed(session().defaultEditingContext(), "Xwebuser1");
}


public EOArrayDataSource xwebuser1ArrayDataSource() {
EOClassDescription cd = EOClassDescription.classDescriptionForEntityName("Xwebuser1");
EOArrayDataSource dataSource = new EOArrayDataSource(cd, session().defaultEditingContext());
dataSource.setArray(xwebuser());
return dataSource;
}


public WOComponent adminUsers(){
ListPageInterface lpi = (ListPageInterface)D2W.factory().listPageForEntityNamed("Xwebuser1", session());
lpi.setNextPage(this);
lpi.setDataSource(xwebuser1ArrayDataSource());
return (WOComponent)lpi;
}


}

Am I all wet or is this ok? I am going to try to use a fetchspec in xwebuser() next. D2WList is not talked about much in the docs or in the lists so I'm guessing this stuff is totally obvious to you all.

justin tocci
fort wayne, in
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Multi-threaded access to DB in WOLongResponsePage [was Re: Problem with primary key generation]
  • Next by Date: Re: EOGeneralAdaptorException Error
  • Previous by thread: Multi-threaded access to DB in WOLongResponsePage [was Re: Problem with primary key generation]
  • Next by thread: Table Column Limit
  • Index(es):
    • Date
    • Thread