Re: ERD2W menus not working properly
Re: ERD2W menus not working properly
- Subject: Re: ERD2W menus not working properly
- From: Ramsey Gurley <email@hidden>
- Date: Tue, 31 Jul 2012 09:50:41 -0700
Please keep questions/replies on list so that everyone may benefit/assist :-)
On Jul 30, 2012, at 8:50 PM, Sr. Ângelo Andrade Cirino wrote:
> Dear Ramsey,
>
> I am very frustrated. I created two new test projects following your steps in the presentation, choosing 'WO Project' from template and then 'Modern D2W Application', one project with the ERMovies Logic framework and the other with a very simple model I created (two entities with a to one relationship). But in both projects the navigation menu did not work.
You shouldn't need to do that any longer. If you create a new Wonder D2W project, it will be an ERModern project these days.
> Should I trash my installation, a brand new Eclipse/WOLips/Wonder standard installation, and try again? I can not see what I am doing wrong.
Sorry about that. The install process for WO/Wonder/WOLips just sucks. It's amazing to me that anyone new gives it a try. I saw sometime ago that Ken Ishimoto had been working on an installer, but I never had a chance to try it. We all muddled through this at one point, if that gives you any comfort :-)
If your app launches, it's probably not your installation.
> Worse, not only the navigation menu doesn't work,
Did you try debugging your rule firings to see what was being set for navigationState and why?
> but also the tabs and sections features for grouping display properties. The following rule
>
> 100 : (entity.name = 'Pacote' and task = 'edit') => displayPropertyKeys = ("[Geral]", "encerramento", "título", "resumo", "títuloEstendido", "moeda", "descrição", "principal", "[Imagens]", "miniatura", "imagemPequena", "imagemGrande", "[Outras informações]", "opçãoIncluídas", "informaçãoAdicionals", "condiçãoPacotes") [com.webobjects.directtoweb.Assignment]
>
> Gives this exception:
>
> <com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException message '<com.visionar.modelos.Pacote 0x461fbe88> valueForKey(): lookup of unknown key: '[Geral]'. This class does not have an instance variable of the name [Geral] or _[Geral], nor a method of the name [Geral], _[Geral], get[Geral], or _get[Geral]' object '<com.visionar.modelos.Pacote pk:"1">' key '[Geral]'>
>
To use tabs on a Modern page, you have to have a tab or wizard page configuration/subtask. Otherwise, it doesn't work. When you create the page, use a pageConfiguration like "EditTabEntity" or "EditWizardEntity" instead of "EditEntity". CreateEntity pages are subtask=wizard by default, so the tabbing should work.
Ramsey
> D2W and the navigation system are way too powerful for me to not use them as the basis for WO development. I used to create components and a lot of code that can with a lot less work be designed with D2W applications and I would like to move forward, but having the navigation menu system and the properties display grouping working will help me a lot.
>
> Thanx,
>
> Angelo
>
> Em 30/07/2012, às 16:46, Ramsey Gurley escreveu:
>
>>>
>>>
>>> Well, I simplified the menu to just one level with four items to experiment with the rules. When selected, each menu is performing adequately, listing the entities it is meant to, with the associated action and D2W.factory().listPageForEntityNamed. But the menu system stubbornly do not highlight the chosen menu option, Principal is locked to be the highlighted menu. The menu and the associated rules are now these:
>>>
>>> NavigationMenu.plist
>>>
>>> (
>>> {
>>> name = Root;
>>> children = (Principal,Pacotes,Clientes,Usuarios);
>>> },
>>> {
>>> name = Principal;
>>> action = "session.navController.homeAction";
>>> },
>>> {
>>> name = Pacotes;
>>> action = "session.navController.pacotesAction";
>>> },
>>> {
>>> name = Clientes;
>>> action = "session.navController.clientesAction";
>>> },
>>> {
>>> name = Usuarios;
>>> action = "session.navController.usuáriosAction";
>>> }
>>> )
>>>
>>> user.d2wmodel rules associated with the menu items
>>>
>>> {"author" = "100"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Usuario*"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "navigationState"; "value" = "Usuarios"; }; },
>>> {"author" = "100"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Produto*"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "navigationState"; "value" = "Produtos"; }; },
>>> {"author" = "100"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Clientes*"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "navigationState"; "value" = "Clientes"; }; },
>>>
>>> I can not see what I am doing wrong so that the navigation menu isn't highlighting the selected option. But I also need to yet figure out how to create and use submenus.
>>>
>>> Thanks,
>>>
>>> Angelo
>>
>> That looks like it should work. You need to debug your rule firings to see why nothing is happening.
>>
>> Ramsey
>
_______________________________________________
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