Could someone please comment on this quote from the myfaces.org site:

<snip>

If you want to use jscookMenu in your application, you will have to: 

Add jscookmenu directory containing css and scripting code to your web 
directory (you can find it in the examples application). 
Add scripts and stylesheets for the theme you would like to use to html-header 
(see also inc/header.inc in the examples application) 
<!-- JSCook Menu -->
<script language="JavaScript" src="jscookmenu/JSCookMenu.js" 
type="text/javascript">
<script language="JavaScript" src="jscookmenu/ThemeOffice/theme.js"/>
<link rel="stylesheet" href="jscookmenu/ThemeOffice/theme.css" type="text/css"/>
<script language="JavaScript" src="jscookmenu/ThemeMiniBlack/theme.js"/>
<link rel="stylesheet" href="jscookmenu/ThemeMiniBlack/theme.css" 
type="text/css"/>
<script language="JavaScript" src="jscookmenu/ThemeIE/theme.js"/>
<link rel="stylesheet" href="jscookmenu/ThemeIE/theme.css" type="text/css"/>
<script language="JavaScript" src="jscookmenu/ThemePanel/theme.js"/>
<link rel="stylesheet" href="jscookmenu/ThemePanel/theme.css" type="text/css"/>
            see examples/jscookmenu.jsp for an example! 

</snip>

I don't see any jscookmenu directory in the simple.war of the distribution, but 
it seems to work.
Replicating the same setup in my application doesn't work, though.  I'm using 
myFaces 1.1.1 with the corresponding version o f the tomahawk.jar.  I've tried 
the extension filter as been suggested to no avail.  
I'm at a loss finding a solution, but looks like people have been successful 
before.  Please help me!!

Here is my web.xml file:
=======================================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN"
                         "http://java.sun.com/dtd/web-app_2_3.dtd";>
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by BPTA Iniative 
(Credit Suisse First Boston) -->
<web-app>
        <context-param>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>server</param-value>
        </context-param>

        <context-param>
                <param-name>log4jConfigLocation</param-name>
                <!-- Should it be under /web-inf/classes instead ??? -->
                <!--<param-value>/WEB-INF/log4j.properties</param-value>-->
                <param-value>classpath:log4j.properties</param-value>
        </context-param>


        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>/WEB-INF/PortalContext.xml</param-value>
        </context-param>


        <context-param>
                <param-name>javax.faces.CONFIG_FILES</param-name>
                <!-- This will need to be split among multiple files -->
                <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <context-param>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>server</param-value>
        </context-param>
        <context-param>
                <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
                <param-value>true</param-value>
        </context-param>
        <context-param>
                <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
                <param-value>false</param-value>
        </context-param>
        <context-param>
                <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
                <param-value>true</param-value>
        </context-param>
        <context-param>
                <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
                <param-value>true</param-value>
        </context-param>

        <filter>
                <filter-name>MyFacesExtensionsFilter</filter-name>
                <filter-class>
                        org.apache.myfaces.webapp.filter.ExtensionsFilter
                </filter-class>
                <init-param>
                        <param-name>maxFileSize</param-name>
                        <param-value>20m</param-value>
                        <description>
                                Set the size limit for uploaded files. Format: 
10 - 10
                                bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
                        </description>
                </init-param>
        </filter>
        
        <filter-mapping>
                <filter-name>MyFacesExtensionsFilter</filter-name>
                <servlet-name>Faces Servlet</servlet-name>
        </filter-mapping>

        <filter-mapping>
                <filter-name>MyFacesExtensionsFilter</filter-name>
                <url-pattern>/faces/*</url-pattern>
        </filter-mapping>

        <filter-mapping>
                <filter-name>MyFacesExtensionsFilter</filter-name>
                <url-pattern>*.jsf</url-pattern>
        </filter-mapping>

        <filter>
                <filter-name>SecurityFilter</filter-name>
                <filter-class>
                        com.csfb.fao.clr.security.SecurityFilter
                </filter-class>
        </filter>
        <filter>
                <filter-name>hibernateFilter</filter-name>
                <filter-class>
                        
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
                </filter-class>
        </filter>

        <filter-mapping>
                <filter-name>SecurityFilter</filter-name>
                <url-pattern>/jsp/explorer/*</url-pattern>
        </filter-mapping>
        <filter-mapping>
                <filter-name>SecurityFilter</filter-name>
                <url-pattern>/jsp/refdata/*</url-pattern>
        </filter-mapping>
        <filter-mapping>
                <filter-name>SecurityFilter</filter-name>
                <url-pattern>/jsp/reports/*</url-pattern>
        </filter-mapping>
        <filter-mapping>
                <filter-name>SecurityFilter</filter-name>
                <url-pattern>/jsp/lcw/*</url-pattern>
        </filter-mapping>
        <filter-mapping>
                <filter-name>hibernateFilter</filter-name>
                <url-pattern>*.jsf</url-pattern>
        </filter-mapping>
        
        <listener>
                <listener-class>
                        org.apache.myfaces.webapp.StartupServletContextListener
                </listener-class>
        </listener>
        <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>
                        org.apache.myfaces.webapp.MyFacesServlet
                </servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
                <servlet-name>authservlet</servlet-name>
                <servlet-class>
                        com.csfb.fao.clr.security.AuthServlet
                </servlet-class>
                <load-on-startup>2</load-on-startup>
        </servlet>
        <servlet>
                <servlet-name>SpringContextServlet</servlet-name>
                <servlet-class>
                        org.springframework.web.context.ContextLoaderServlet
                </servlet-class>
                <load-on-startup>2</load-on-startup>
        </servlet>

        <servlet>
                <servlet-name>JasperController</servlet-name>
                <servlet-class>
                        com.csfb.fao.clr.reports.prototype.JasperController
                </servlet-class>
        </servlet>

        <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>

        <servlet-mapping>
                <servlet-name>authservlet</servlet-name>
                <url-pattern>/auth</url-pattern>
        </servlet-mapping>

        <servlet-mapping>
                <servlet-name>JasperController</servlet-name>
                <url-pattern>/reports/jasper</url-pattern>
        </servlet-mapping>

        <session-config>
                <session-timeout>30</session-timeout>
        </session-config>

        <taglib>
                <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
                <taglib-location>/WEB-INF/tlds/c-1_0.tld</taglib-location>
        </taglib>

</web-app>
=======================================================================================================

This is how I call the tag from the jsp:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>

<html>

<[EMAIL PROTECTED] file="../include/menu.inc"%>

<!--
/*
 * Copyright 2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
//-->

<body>

Hello Simeon 
<f:view>
        <f:loadBundle
                basename="com.csfb.fao.clr.reports.resource.example_messages"
                var="example_messages" />
        <t: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
        */%>
                <t:navigationMenuItem id="nav_1"
                        itemLabel="#{example_messages['nav_Home']}" 
action="go_home" />
                <t:navigationMenuItem id="nav_2"
                        itemLabel="#{example_messages['nav_Examples']}">
                        <t:navigationMenuItem id="nav_2_1"
                                itemLabel="#{example_messages['nav_Sample_1']}" 
action="go_sample1" />
                        <t:navigationMenuItem id="nav_2_2"
                                itemLabel="#{example_messages['nav_Sample_2']}" 
action="go_sample2"
                                icon="../../img/myfaces.gif" />
                        <t:navigationMenuItem id="nav_2_3"
                                itemLabel="#{example_messages['nav_Validate']}" 
action="go_validate"
                                icon="../../img/myfaces.gif" />
                        <t:navigationMenuItem id="nav_2_4"
                                
itemLabel="#{example_messages['nav_Components']}"
                                icon="../../img/component.gif" split="true">
                                <t:navigationMenuItem id="nav_2_4_1"
                                        
itemLabel="#{example_messages['nav_sortTable']}"
                                        action="go_sortTable" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_2"
                                        
itemLabel="#{example_messages['nav_Selectbox']}"
                                        action="go_selectbox" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_3"
                                        
itemLabel="#{example_messages['nav_FileUpload']}"
                                        action="go_fileupload" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_4"
                                        
itemLabel="#{example_messages['nav_TabbedPane']}"
                                        action="go_tabbedPane" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_5"
                                        
itemLabel="#{example_messages['nav_Calendar']}"
                                        action="go_calendar" 
icon="../../img/myfaces.gif" split="true" />
                                <t:navigationMenuItem id="nav_2_4_6"
                                        
itemLabel="#{example_messages['nav_Popup']}" action="go_popup"
                                        icon="../../img/myfaces.gif" 
split="true" />
                                <t:navigationMenuItem id="nav_2_4_7"
                                        
itemLabel="#{example_messages['nav_Date']}" action="go_date"
                                        icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_8"
                                        
itemLabel="#{example_messages['nav_InputHtml']}"
                                        action="go_inputHtml" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_9"
                                        
itemLabel="#{example_messages['nav_tree2']}" action="go_tree2"
                                        icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_10"
                                        
itemLabel="#{example_messages['nav_treeTable']}"
                                        action="go_treeTable" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_11"
                                        
itemLabel="#{example_messages['nav_rssTicker']}"
                                        action="go_rssticker" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_12"
                                        
itemLabel="#{example_messages['nav_dataScroller']}"
                                        action="go_datascroller" 
icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_13"
                                        
itemLabel="#{example_messages['nav_css']}" action="go_css"
                                        icon="../../img/myfaces.gif" />
                                <t:navigationMenuItem id="nav_2_4_14"
                                        
itemLabel="#{example_messages['nav_newspaperTable']}"
                                        action="go_newspaperTable" 
icon="../../img/myfaces.gif" />
                        </t:navigationMenuItem>
                </t:navigationMenuItem>
        </t:jscookMenu>
</f:view>
<[EMAIL PROTECTED] file="../include/menu_footer.jsp"%>

</body>

</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is what comes back from the server(view source):
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




<html>

<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
  <title>MyFaces - the free JSF Implementation</title>
  <link rel="stylesheet" type="text/css" href="../../css/menu.css" />
</head>


<!--
/*
 * Copyright 2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
//-->

<body>

Hello Simeon 

        
        
                
                
                
                        
                        
                        
                        
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                        
                
        <script type="text/javascript"><!--
var id0_menu =
[[null, 'Home', 'id0_menu:go_home', 'linkDummyForm', null],
[null, 'Examples', null, 'linkDummyForm', null,[null, 'Sample 1', 
'id0_menu:go_sample1', 'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Sample 2', 'id0_menu:go_sample2', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Validations', 'id0_menu:go_validate', 
'linkDummyForm', null],
_cmSplit,['<img src="../../img/component.gif"/>', 'Components', null, 
'linkDummyForm', null,['<img src="../../img/myfaces.gif"/>', 'Sortable Table', 
'id0_menu:go_sortTable', 'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Selectboxes', 'id0_menu:go_selectbox', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'File upload', 'id0_menu:go_fileupload', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Tabbed Pane', 'id0_menu:go_tabbedPane', 
'linkDummyForm', null],
_cmSplit,['<img src="../../img/myfaces.gif"/>', 'Calendar', 
'id0_menu:go_calendar', 'linkDummyForm', null],
_cmSplit,['<img src="../../img/myfaces.gif"/>', 'Popup', 'id0_menu:go_popup', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Date', 'id0_menu:go_date', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Html Editor', 'id0_menu:go_inputHtml', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Tree2', 'id0_menu:go_tree2', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Tree Table', 'id0_menu:go_treeTable', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'RssTicker', 'id0_menu:go_rssticker', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'DataScroller', 
'id0_menu:go_datascroller', 'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Stylesheet', 'id0_menu:go_css', 
'linkDummyForm', null],
['<img src="../../img/myfaces.gif"/>', 'Newspaper Table', 
'id0_menu:go_newspaperTable', 'linkDummyForm', null]]]];
//--></script><div id="id0_menu"></div>
<script type="text/javascript"><!--
        cmDraw ('id0_menu', id0_menu, 'hbr', cmThemeOffice, 'ThemeOffice');
//--></script>
<form id="linkDummyForm" name="linkDummyForm" style="display:inline" 
method="post" action="/Portal-MF/jsp/reports/jscookmenu.jsf"><input 
type="hidden" name="autoScroll" /><input type="hidden" name="jscook_action" 
/><script type="text/javascript"><!--
function clear_linkDummyForm() {
  var f = document.forms['linkDummyForm'];
  f.elements['jscook_action'].value='';
  f.target='';
}
clear_linkDummyForm();
//--></script></form><script type="text/javascript"><!--
function getScrolling() {
    var x = 0; var y = 0;
    if (self.pageXOffset) {
        x = self.pageXOffset;
        y = self.pageYOffset;
    } else if (document.documentElement && document.documentElement.scrollLeft) 
{
        x = document.documentElement.scrollLeft;
        y = document.documentElement.scrollTop;
    } else if (document.body) {
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
    }
    return x + "," + y;
}

//--></script>
<br/>
<br/>

<a href="home.jsf">[HOME]</a>
&nbsp;
<a href="/Portal-MF/jsp/reports/jscookmenu.jsp.source">[SOURCE]</a>


</body>

</html>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Thank you.



-----Original Message-----
From: Leyzerzon, Simeon [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: 'MyFaces Discussion'
Subject: RE: jscookMenu set up


Paul,
Thanks for replying.  I've added the filter as described in this article, but 
still the menu doesn't display.  Anything else I could be missing?
Regards,
Simeon

-----Original Message-----
From: Paul Spencer [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 15, 2006 9:42 AM
To: MyFaces Discussion
Subject: Re: jscookMenu set up


Make sure the extension filter is defined in web.xml.

http://myfaces.apache.org/tomahawk/extensionsFilter.html

Paul Spencer

Leyzerzon, Simeon wrote:
> When comparing the 'view source' from the page in my application and the page 
> of the jscookmenu.jsf in the simple.war sample download, I've discovered that 
> my pages is missing the following line (generated by the jsf engine 
> presumably) and therefore the menu doesn't not appear for me:
> 
> script 
> src="/simple/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/JSCookMenu.js"
>  type="text/javascript"><!--
> 
> //--></script>
> <script 
> src="/simple/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/MyFacesHack.js"
>  type="text/javascript"><!--
> 
> //--></script>
> <script type="text/javascript"><!--
> myThemeOfficeBase='/simple/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/';
> //--></script>
> <script 
> src="/simple/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/theme.js"
>  type="text/javascript"><!--
> 
> //--></script>
> <link rel="stylesheet" 
> href="/simple/faces/myFacesExtensionResource/navmenu.jscookmenu.HtmlJSCookMenuRenderer/11302665/ThemeOffice/theme.css"
>  type="text/css" /></head>
> 
> What needs to be done to enable the generation of these javascripts and 
> css's??
> 
> Thank you in advance.
> Simeon
> 
> -----Original Message-----
> From: Leyzerzon, Simeon [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 14, 2006 5:35 PM
> To: 'MyFaces Discussion'
> Subject: RE: jscookMenu set up
> 
> 
> I've found this link http://myfaces.apache.org/tomahawk/jscookmenu.html
> with configuration instructions saying that some css files and scripts need 
> to be added into the jscookmenu directory, but this directory is not present 
> in the simple.war distributed with myFaces.  
> 
> Where could these be found?  Is there anyone who's done this?
> 
> Thank you in advance,
> Simeon
> 
> -----Original Message-----
> From: Leyzerzon, Simeon [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 14, 2006 10:39 AM
> To: 'users@myfaces.apache.org'
> Subject: jscookMenu set up
> 
> 
> Could someone please give me a hand configuring jscookMenu in my project. 
> I've looked at the samples supplied with simple.war application and am trying 
> to recreate them, but having no luck so far.
> What stumbles me is the fact that even though there's this line in the 
> jscookmenu.jsp:
> 
> <%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>
> 
> web.xml doesn't seem to define any tag libraries.  How is it done then?
> 
> Could someone please give me a comprehensive list of what needs to be done in 
> order to successfully configure the jsCookMenu in a project (or maybe a small 
> code sample)?  
> 
> Appreciate your help!!
> 
> Regards,
> 
> Simeon
> 
> 
> 
> ==============================================================================
> Please access the attached hyperlink for an important electronic 
> communications disclaimer: 
> 
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ==============================================================================
> 
> 
> ==============================================================================
> Please access the attached hyperlink for an important electronic 
> communications disclaimer: 
> 
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ==============================================================================
> 
> 
> ==============================================================================
> Please access the attached hyperlink for an important electronic 
> communications disclaimer: 
> 
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ==============================================================================
> 
> 
> 


==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================


==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================

Reply via email to