File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Using t:jscookmenu results in Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Using t:jscookmenu results in "cmDraw is not defined" error" Watch "Using t:jscookmenu results in "cmDraw is not defined" error" New topic
Author

Using t:jscookmenu results in "cmDraw is not defined" error

Wally Hartshorn
Ranch Hand

Joined: Jan 30, 2003
Posts: 77
Can someone explain to me the basics of how to setup t:jscookmenu? When
I try to use it, instead of a menu, I get this JavaScript error: "cmDraw
is not defined"

I'm using MyFaces 1.1.3, Java 1.5, and Tomcat 5.5. My browser is
Firefox 1.5

Here's the JSP code:

Here's part of the web.xml file:

The documentation at http://myfaces.apache.org/tomahawk/jscookmenu.html
isn't very helpful.

It says that I need to "Add jscookmenu directory containing css and
scripting code to your web directory (you can find it in the examples
application)". However, I've been unable to find any such thing. I've
downloaded the binary distribution of myfaces-1.1.1-examples.zip,
unzipped it, and deployed simple.war, but there is no trace of a
jscookmenu directory in there.

It also says that I need to "Add scripts and stylesheets for the theme
you would like to use to html-header (see also inc/header.inc in the
examples application)". Again, no sign of any of these files in
simple.war.

According to http://wiki.apache.org/myfaces/JSCook_Menu, "The offical
docs seem to be out of date. You no longer have to include the
javascript, as that is now handled by the extensions filter." That would
explain why I can't seem to find any of this stuff in simple.war, but it
doesn't explain why I can't get it to work.

Can anyone point me in the right direction?

Thanks,
Wally


Wally Hartshorn
Sorcha Fooskle
Greenhorn

Joined: Aug 03, 2010
Posts: 3
I ran into the same problem now.

Make sure your jsf has these in the head:

<link rel="stylesheet" type="text/css" href="jscookmenu/ThemeOffice/theme.css" />
<script type="text/javascript" src="jscookmenu/JSCookMenu.js" />
<script type="text/javascript" src="jscookmenu/ThemeOffice/theme.js" />

and the relevant files in your jscookmenu folder. They can be downloaded from http://sourceforge.net/projects/jscook/files/.
Sorcha Fooskle
Greenhorn

Joined: Aug 03, 2010
Posts: 3
Please ignore previous advice and see correct answer here:
http://stackoverflow.com/questions/3424071/myfaces-tomahawk-jscookmenu-failure-to-navigate-to-page-defined-by-action-in-fa

This error occurs when filter mappings have not been defined correctly in web.xml.
 
I agree. Here's the link: jrebel
 
subject: Using t:jscookmenu results in "cmDraw is not defined" error
 
Similar Threads
Jsf t:JsCookMenu is not working
t:jscookMenu with Tiles
Tomahawk filter brings HTTP 404
Tomahawk1.1.3 ugrade exception...ExtensionsFilter not correctly configured. JSF mappi
MyFaces Tomahawk latest 1.1.7-SNAPSHOT problem