Re: Ponder and ERXNavigation

Ramsey Gurley <[email protected]>
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <[email protected]>
On Dec 2, 2012, at 7:21 AM, James Cicenia wrote:

> Ramsey-
> 
> That worked automagically. My question is how? 


Look in ERUsers/Resources/NavigationMenu.plist. You'll see the navigation item for Login there.  The navigation manager checks all the frameworks in the classpath for a NavigationMenu.plist, not just the one in your application :-)

The idea was to make it as simple as possible to get login working. Just add

children = (…, Login, Logout);

to your root nav menu item and it works.


> I am not used to not specifying an action in my nav plist. And all examples I see also have an explicit action associated with the menu item.
> Originally, I had explicitly set the action and action class to call the loginAction. That didn't work. But when I leave it blank like you suggested it works.


Because the nav item Login calls the 'Login' direct action, not the 'login' direct action :-)  What ERD2WDirectAction subclasses will do is load a page configuration if no action is found. So when it doesn't find a method named "LoginAction()" it tries to load a page configuration named "Login" instead.  You can see several rules related to login if you search for it in ERAuth, ERUsers, and ERR2D2W.

That in turn loads the D2W login page I made for login. The page only has the username/password login component by default, but it could be extended to offer multiple types of login, all handled through the loginAction.  (I had originally envisioned doing a second type of authentication using open id, but I never got around to it.)

Anyway, since each login component targets a different ERAuthenticationRequest subclass, I pass the entityName in a hidden field to the direct action so that the loginAction() knows which authentication processor to use.


> However, the url associated with Login is not the correct url:port. It defaults in just "localhost" without a port number. Is that because I am using direct connect?


Sounds right. You'd need to change your run/debug configuration in eclipse to set WOHost, WOAdaptorURL, and disable direct connect to get something else.  I usually just develop using direct connect personally. It's easier to me. If you want to set up your ssl for direct connect, search the ERExtensions Properties file for SSL DirectConnect for info on how to do it.


> Finally, if I wanted to create my own link in the menu and just call it "Create an Account" vs. CreateERUser, how would it now know which action to call.


You could reference the existing CreateERUser item in the ERUsers nav plist for that if you like. To set the name of the link, use your Localizable.strings file. I think the key is nav.CreateERUser, but I'm not sure. You should be able to dump your created keys and see it though.

Ramsey

> Curious and moving forward,
> James

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net/

_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.