Fwd: ERModern Navigation Menu question
Fwd: ERModern Navigation Menu question
- Subject: Fwd: ERModern Navigation Menu question
- From: Daniel Beatty <email@hidden>
- Date: Tue, 12 Oct 2010 21:51:11 -0700
Begin forwarded message:
> From: Daniel Beatty <email@hidden>
> Date: October 12, 2010 9:47:55 PM PDT
> To: ISHIMOTO Ken <email@hidden>
> Cc: Daniel Beatty <email@hidden>
> Subject: Re: ERModern Navigation Menu question
>
> Thanks guys,
> Those methods work.
>
> Some of the submenus had this menu.submenu structure. What are the guidelines to use these specifications?
>
> Thank you,
> Dan
>
>
> On Oct 12, 2010, at 9:37 PM, ISHIMOTO Ken wrote:
>
>> 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@hidden
>>> (760)939-7097
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>
>> Thank you
>>
>> --------------------------------------------------------
>> K's ROOM (ISHIMOTO Ken)
>> --------------------------------------------------------
>> [E-Mail] <email@hidden>
>> [iChat:] <email@hidden>
>> [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@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
>
> Dan Beatty, M.S. CS (B.S. EECS)
> Ph.D. Student
> Texas Tech University
> email@hidden
> http://web.me.com/danielbeatty/My_Home_Page/Welcome.html
> (806)438-6620
>
>
>
>
>
>
>
>
>
_______________________________________________
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