On 2010-10-18, at 1:47 PM, David Avendasora wrote: > > On Oct 18, 2010, at 4:23 PM, David Holt wrote: > >> >> On 2010-10-18, at 1:11 PM, David Avendasora wrote: >> >>> Hi all, >>> >>> I'm using ERModernD2W and ERXNavigation. I've followed Dave L's example and >>> setup a NavController instead of putting all the navigation methods in the >>> session, but even with that my NavController is getting to be huge, with >>> lots of repeated methods that are identical except for which entity they >>> are for. >> >>> >>> What I'd like to do is create a NavController for each tab. This is simple >>> enough, and I can easily target the entity-specific nav controller from the >>> Navigation.plist by setting the action binding to >>> session.myEntityNavController.action but I'd like to be able to define a >>> nav controller delegate with a rule and just have the action binding have >>> the action method name in it. >>> >>> For example, for tabs that are basically for doing CRUD functions on an >>> Entity I'd have a GenericEntityNavController superclass that has some basic >>> stuff in it that all entity-focused tabs will want to be able to do (query, >>> list, inspect, etc) then subclass it with delegates for each entity that do >>> entity-specific things. I would create a rule that would define which >>> controller to use, similar to how I can specify a pageController. >>> >>> Is this possible? Can the same functionality be achieved in a different way? >> >> I'd take a closer look at BugTracker Factory class. This is where navigation >> tab actions get triggered in BugTracker. I think you'll find that the >> calling of the various methods for page creation is pretty efficient. There >> are some nice generic methods at the top of the code. It's still large and >> relatively convoluted to understand, but I'm imagining the resulting code is >> not quite as large as using a NavigationController style class might get >> you. You may be able to combine some of your ideas above with the coding >> style in Factory. > > Wow. That looks like it does pretty much what I am trying to do, I > think...but it makes my brain hurt.
http://sourceforge.net/mailarchive/forum.php?thread_name=BB5A6915-149E-4CE6-A165-CC48A00B635D%40krank.net&forum_name=wonder-disc > It's the D2W/ERNavigation equivalent to saying "Oh, you like that addition & > subtraction? You should try calculus, it's even more powerful." > > I think I'll go back to my huge, monolithic NavController for now. Maybe I'll > work up to multiplication... > > Dave
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
