You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2006/09/13 22:05:23 UTC
Re: Using t:jscookmenu results in "cmDraw is not defined" error
Are the elements in your web.xml file in the order you show them?
Web.xml elements must be in a specific order -- probably some of your
configuration options are being ignored.
filters, then filter-mappings, then listeners, then servlets, then
servlet-filters.
On 8/30/06, Wally Hartshorn <Wa...@epa.state.il.us> wrote:
> 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:
>
> <t:jscookMenu layout="hbr" theme="ThemeOffice">
> <t:navigationMenuItem id="nav_1" itemLabel="Home"
> action="home" />
> <t:navigationMenuItem id="nav_2" itemLabel="View"
> action="view" />
> <t:navigationMenuItem id="nav_3" itemLabel="Edit"
> action="edit" />
> </t:jscookMenu>
>
> Here's part of the web.xml file:
>
> <servlet>
> <servlet-name>Faces Servlet</servlet-name>
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>Faces Servlet</servlet-name>
> <url-pattern>*.faces</url-pattern>
> </servlet-mapping>
>
> <filter>
> <filter-name>extensionsFilter</filter-name>
> <filter-class>
> org.apache.myfaces.webapp.filter.ExtensionsFilter
> </filter-class>
> </filter>
>
> <filter-mapping>
> <filter-name>extensionsFilter</filter-name>
> <servlet-name>Faces Servlet</servlet-name>
> </filter-mapping>
>
> <filter-mapping>
> <filter-name>extensionsFilter</filter-name>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
> 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
>