Project Documentation
Foundation

Description

Renders a Javascript Menu based on the excellent JSCookMenu by Heng Yuan, the nested NavigationMenuItem(s) are rendered as Javascript Menu.

Screen Shot

jscookmenu

API

since 1.0.5
author MyFaces Team
component-family javax.faces.Command
renderer-type org.apache.myfaces.JSCookMenu
component-class org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookMenu
renderer-class org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer
tag-class org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuTag

Usage

<t:jscookMenu [ user-role-support-attributes ]
                 [layout="values {hbr, hbl, hur, hul, vbr, vbl, vur, vul}"]
                 [theme="values {ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel}"]
    Nested <t:navigationMenuItem> or <t:navigationMenuItems> tags (menu items)
</t:jscookMenu>
            

Syntax

<t:jscookMenu>

layout - hbr, hbl, hur, hul, vbr, vbl, vur, vul.
theme - ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel.

Instructions

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!