Adding JSCookMenu ThemeOffice2003

I am using tomahawk jsf components, but version 1.1.1 does not support ThemeOffice2003 which is availabel at http://www.cs.ucla.edu/~heng/JSCookMenu/ThemeOffice2003.html. Is it possible to include this theme to the project with tomahawk 1.1.1 an how? Regards Simy
[277 byte] By [Simya] at [2007-10-2 7:31:48]
# 1

You need to download and setup correctly the MyFaces, and after

you need to download also the JscoockMenu

It works perfectly, but in the future, the oracle adf faces.next will have better menu componentes and others with ajax

=)

i'm building a enterprise application, you can see the menu it he screenshot

the menus and events are dinamically...

http://img202.imageshack.us/img202/1593/ss0va.jpg

Eduardo_Ivan_Pichlera at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

As I know, ADF Faces.Next are in early developement stage. I know ADF Faces.Next will be a great framework, but for now I will stick to MyFaces also regarding license terms for ADF framework.

Please can you tell me more how to configure MyFaces to use ThemeOffice2003. I have tried but It didn't work.

Regards, Simy

Simya at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Ok

first download at official site, and unzip the jscookmenu files.

After make the code like this on head of html page:

<afh:head title="#{msg.nomeAplicacao}">

<meta http-equiv="Content-Type"

content="text/html; charset=windows-1252"/>

<script language="JavaScript" src="jscookmenu/JSCookMenu.js"></script>

<link rel="stylesheet" href="jscookmenu/ThemeOffice/theme.css"

type="text/css"/>

<script language="JavaScript" src="jscookmenu/ThemeOffice/theme.js"></script>

</afh:head>

And after, put the components:

<af:subform>

<x:jscookMenu layout="hbr" theme="ThemeOffice"

styleLocation="jscookmenu/ThemeOffice/" //may this is not necessary

javascriptLocation="jscookmenu/ThemeOffice/"//may this is not necessary too

binding="#{backing_sag_index.jscookMenu1}"

id="jscookMenu1">

<x:navigationMenuItems binding="#{backing_sag_index.navigationMenuItems1}"

id="navigationMenuItems1"

value="#{backing_sag_index.menu}"/> //array of navigationMenuItems

</x:jscookMenu>

</af:subform>

if the paths of you components are right, the menu will appear.

Thanks

Eduardo_Ivan_Pichlera at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Eduardo

I am also having some problems with JSCookMenu. I would like to follow your instructions but can you clarify what the "afh", "af" and "x" taglibs are?

The MyFaces example has the Tomahawk taglib identified with a prefix of "t" whereas you are using "x".

Including the two snippets of code in my page does not cause the menu to be displayed.

I tried dropping the <afh:head> tag and putting the code directly in the header block but this made no difference.

I also tried dropping the <af:subform> tag and putting <x:jscookmenu> tag in a <f:view> but this caused compilation errors.

I have only been looking at MyFaces for a couple of days so any help would be most appreciated.

Thanks

Andrew

amooresa at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

The adf, and af are my tags correspondig a adf faces(oracle implementation of jsf)

But as you sayd, replacing these tags by pure html, like <head><body> etc, would be to work...

Are you sure you download the jscookmenu here http://www.cs.ucla.edu/~heng/JSCookMenu/ and put in your pages?

and he must unziped too

thanks

Eduardo_Ivan_Pichlera at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

My simple page now looks like this:

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="x"%>

<html>

<head>

<meta http-equiv="Content-Type"

content="text/html; charset=windows-1252"/>

<script language="JavaScript" src="jscookmenu/JSCookMenu.js"></script>

<link rel="stylesheet" href="jscookmenu/ThemeOffice/theme.css" type="text/css"/>

<script language="JavaScript" src="jscookmenu/ThemeOffice/theme.js"></script>

<title>JSCookMenu Page</title>

</head>

<body>

<x:jscookMenu layout="hbr" theme="ThemeOffice"

styleLocation="jscookmenu/ThemeOffice/"

javascriptLocation="jscookmenu/ThemeOffice/"

id="jscookMenu1">

<x:navigationMenuItems id="navigationMenuItems1" value="Menu 1"/>

</x:jscookMenu>

</body>

</html>

From the root dir of my web app I have a jscookmenu folder with all zip files unzipped.

I am running under Tomcat 5.0 and when I access the jsp a blank page is displayed.

I have the same problem with the MyFaces demo app; I moved the jscookmenu.jsp page to my web app and it doesn't work either (it does work as part of the demo).

amooresa at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

Your problem, if it hasn't been solved, is due to a lack of spacing between the <script> tags. I think its a bug.

<script language="JavaScript" src="jscookmenu/ThemeOffice/theme.js"></script> should be

<script language="JavaScript"

src="jscookmenu/ThemeOffice/theme.js"> </script>

matt.furya at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8

Corriging my previous posts..... Sorry so much!

Don't need to put the path of javascript codes...skip it

You need only to configure the "MyFaces Extensions Filters"

and put the Jscookmenu out of a form....

and set the theme and layout directly on the jscookmenu component

theme="ThemeOffice" layout="hbr"

Eduardo_Ivan_Pichlera at 2007-7-16 21:11:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...