Hi Daniel,
Yes I got that too.
The Code in MenuHeader
// ERXModernNavigationMenu Support
public NSKeyValueCoding navigationContext() {
NSKeyValueCoding context =
(NSKeyValueCoding)session().objectForKey("navigationContext");
if (context().page() instanceof D2WPage) {
context = ((D2WPage)context().page()).d2wContext();
}
if(context == null) {
context = new NSMutableDictionary<Object, String>();
session().setObjectForKey(context, "navigationContext");
}
ERXNavigationState state =
ERXNavigationManager.manager().navigationStateForSession(session());
return context;
}
didn't work for me. Only in D2W App, but not in Hybrid App's. The design above
won't work with second or third Layer.
I also was debugging much, because it really didn't work.
I changed it like below, and now it works great in Hybrid App's too.
//********************************************************************
// Navigation
//********************************************************************
/**
* Rule : Set "navigationState" to update ERXNavigationState
*/
public NSKeyValueCoding navigationContext() {
NSKeyValueCoding context =
(NSKeyValueCoding)session().objectForKey("navigationContext");
if (context().page() instanceof D2WPage) {
/* D2W Page */
return ((D2WPage)context().page()).d2wContext();
} else if(context instanceof NSMutableDictionary<?,?> ||
context instanceof NSDictionary<?,?>) {
/* not an D2WContext, but Normal Page NSDictionary */
} else if(context == null) {
context = new NSMutableDictionary<Object, String>();
}
ERXNavigationState state =
ERXNavigationManager.manager().navigationStateForSession(session());
NSMutableDictionary<String,String> mdic = new
NSMutableDictionary<String,String>(1);
mdic.setObjectForKey(state.stateAsString(), "navigationState");
context = mdic;
session().setObjectForKey(context, "navigationContext");
return context;
}
Hope this help, and maybe that has to be fixed in the Demo as well.
On 2010/10/12, at 23:23, Daniel Beatty wrote:
> Greetings gurus,
> I was experimenting with ERModernLook and making a custom navigation list. I
> noticed that for menu items not named Home, Movie, Tab, etc that I got an
> unexpected behavior. Namely, those pretty tabs that Dave took care to make
> disappeared and my tabs look pretty sad. After that, I proceeded to look at
> the rule files, the component, and for some CSS entries to determine what is
> controlling this behavior. Since my first glance has come up empty, I am
> forced to seek a better source of knowledge about these things than what I
> personally have. I image it is a simple thing, and I could be working too
> hard. Thus if any of you gurus can point out the “snake under my nose” I
> would appreciate it.
>
> Thank you,
>
> Daniel Beatty
> Computer Scientist, Detonation Sciences Branch
> Code 474300D
> 2401 E. Pilot Plant Rd. M/S 1109
> China Lake, CA 93555
> [email protected]
> (760)939-7097
>
> _______________________________________________
> 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/ken%40ksroom.com
>
> This email sent to [email protected]
Thank you
--------------------------------------------------------
K's ROOM (ISHIMOTO Ken)
--------------------------------------------------------
[E-Mail] <[email protected]>
[iChat:] <[email protected]>
[HP] http://www.ksroom.com/
_____________________________________________________________________
This e-mail has not been scanned for viruses because it was written on an Mac,
and there are NO Viruses on an Apple Computer.
For further information visit http://www.apple.com
_______________________________________________
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]