Hi!
Thanks for the hints!!
I tried like Helmut told me. Now I can see the first level of the menu but the
submenus weren't shown...
Here's my code.
Any ideas?
Thanks Stefan Gesigora
public List getMenu() {
List menu = new ArrayList();
NavigationMenuItem incident = new NavigationMenuItem("Incident", "action1",
null,false);
NavigationMenuItem phases = new NavigationMenuItem("Phases", "action2",
null,false);
NavigationMenuItem factories = new NavigationMenuItem("Factories ", "action3",
null,false);
List testSub = new ArrayList();
testSub.add(new NavigationMenuItem("Development",
"action10", null, false));
testSub.add(new NavigationMenuItem("Consultancy",
"action11", null, false));
testSub.add(new NavigationMenuItem("Services",
"action12", null, false));
NavigationMenuItem[] testSubArray =
(NavigationMenuItem[])testSub.toArray(new NavigationMenuItem[0]);
menu.add(incident);
menu.add(phases);
menu.add(factories);
((NavigationMenuItem)menu.get(1)).setNavigationMenuItems(testSubArray);
return menu;
}
<x:jscookMenu layout="hbr" theme="ThemeOffice">
<x:navigationMenuItems value="#{MenuBean.menu}" />
</x:jscookMenu>
-----Ursprüngliche Nachricht-----
Von: Helmut Juskewycz [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 24. August 2005 12:31
An: MyFaces Discussion
Betreff: Re: problem with JSCookMenu
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi,
i only see jscookmenu when i declare the script in the head otherwise i
see nothing. also on http://myfaces.apache.org/tomahawk/jscookmenu.html
it says that the declaration should stand in the head.
i now use the t:tag but i see no difference.
in my web.xml there are no extension filter, so it should be the default
config?
and by the way thanks for help =) maybe u could look also at my problem
with the link (i wrote today and yesterday in the list).
Delbrouck, Henri-Philippe wrote:
> Hello,
>
> If you use the JSCookMenu tag, and correctly configure the extension filter
> (default config) in the web.xml, you don't need to define any Javascript
> In your page. The corresponding file are automatically uploaded on the
> client and referenced in he page.
> As there is a bug in the 1.0.9 version, you have to download the latest
> nightly build where the bug is resolved.
>
> Have a look at the mail from Bruno Aranda (09 jun 2005). There is an exemple
> how to use the menu in a dynamic way.
>
> If you download the latest nightly build, the extension are now in the
> tomahaw.jar. You should then use the prefix t.
>
> Hope this help.
>
> If still problem, please ask.
>
> Henri-Philippe Delbrouck
>
> -----Original Message-----
> From: Helmut Juskewycz [mailto:[EMAIL PROTECTED]
> Sent: mercredi 24 août 2005 11:09
> To: MyFaces Discussion
> Subject: Re: problem with JSCookMenu
>
>
> hi,
>
> u must add the following to the header:
>
> <!-- JSCook Menu -->
> <script language="JavaScript" src="jscookmenu/JSCookMenu.js"
> type="text/javascript"></script>
> <script language="JavaScript"
> src="jscookmenu/ThemePanel/theme.js"></script>
> <link rel="stylesheet" href="jscookmenu/ThemePanel/theme.css"
> type="text/css">
>
>
>
> optional: Get the latest Nightly Build because there were some bugs with
> submenus.
>
> then just add the jscookmenu and the items. u can add the items like in
> the example (you can find it in the myfaces examples/inc/pageHeader, and
> correct the theme u would like to use - same must defined in the header):
>
>
>
> <x:jscookMenu layout="hbr" theme="ThemeOffice" >
> <%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack,
> ThemeOffice, ThemePanel
> Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl,
> vur, vul
> respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
> */%>
> <x:navigationMenuItem id="nav_1"
> .
> .
> .
> .
> .
> .
> </x:navigationMenuItem>
> <x:navigationMenuItem id="nav_3"
> itemLabel="#{example_messages['nav_Documentation']}" >
> <x:navigationMenuItem id="nav_3_1"
> itemLabel="#{example_messages['nav_Features']}" action="go_features"
> icon="images/myfaces.gif" />
> </x:navigationMenuItem>
> <x:navigationMenuItem id="nav_4"
> itemLabel="#{example_messages['nav_Options']}" action="go_options" />
> <x:navigationMenuItems id="nav_5"
> value="#{navigationMenu.infoItems}" />
>
> </x:jscookMenu>
>
> or the other way:
>
> <x:jscookMenu layout="vbr" theme="ThemePanel">
> <x:navigationMenuItems value="#{MenuBean.enu}" />
> </x:jscookMenu>
> and the Bean returns a List or Array of Navigation Items
>
> public List<NavigationMenuItem> getMenu() {
> List<NavigationMenuItem> menu = new ArrayList<NavigationMenuItem>();
> menu.add(new NavigationMenuItem("bla", "action", null,false));
> return menu;
> }
>
> Stefan Gesigora wrote:
>
>>>Hello folks!
>>>
>>>I've got some problems using JSF RI + myfaces extensions with the
>>>component JSCookMenu. I've tried several settings but it didn't work!
>>>Could anyone give me a description how to implement the JSCookMenu in
>>>the right way?
>>>
>>>Thanks a lot
>>>
>>>Stefan Gesigora
>>>
>>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE
iD8DBQFDDExtkg7OsoSBexYRAoZkAJ9EzJS8+P5POY7MEgDsdszDja9nUQCfSKlJ
3xqMqT9CeUJhdxsT+67+MQo=
=jF8/
-----END PGP SIGNATURE-----