Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Wally Hartshorn
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sorcha Fooskle
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!