Donate SourceForge.net Logo
Overview User Guide Contact Download License & Copyright

About this Project

This is a menu component for the Tapestry Java web framework. The famous JSCookMenu JavaScript menu written by Heng Yuan is embedded in the component in a slightly modified version.
Both vertical or horizontal menues like the green example down on this page can easily be created. The look of the menues is highly customizable. Arbitrary tapestry components can be placed into the menu.

+++++ New : Theme-Studio +++++

Finally, there is a WYSIWYG tool available to design new themes!
  • including shaded multicolored backgrounds
  • themes look the same in all browsers
  • graphically edit images, backgrounds, simple shapes, borders, fonts, etc..
more..

This component is open source and can be used in commercial and non-commercial projects without limitations.

Tapestry 4.x and JavaSE 1.5x are required.
Current version : 2.30

See also the project's page at sourceforge.net

Quick Overview

To use the component

  1. Download the software distribution

  2. Add the js-cook-menu.jar from the distribution to the WEB-INF/lib of your web application

  3. Declare the use of the component in your tapestry .application file
       <library id="menu" specification-path="classpath:/net/sourceforge/tapestry_jsmenu/menu.library"/>

Have a look at the code belonging to the simple example menu on the left. It uses a build-in theme ('SmartGreen') and default behaviour.

There are two ways, to make a menu:
1: With a Java-model : use the component JSCookMenu
2: With a static XML-based model: use the component XmlJSCookMenu









1: Java model

Like many other iterating Tapestry components the structure may be defined by a Java model and is bound to the template by the 'source' attribute, whereas the iterating property is traditionally specified by the 'value' attribute. The same does the JSCookMenu component.

The Java code QuickStart.java
The page specification (just some assets)   QuickStart.page
The html template with the binding QuickStart.html

2: XML model

The same example as above realized with the XmlJsCookMenu component and an XML-model:
The XmlJsCookMenu component works with a static XML-model. In contrast to the more extendible JsCookMenu component, the links are also specified in the model (in this example only DirectLinks are used). No renderer-components must be specified.

The Java code QuickStartXml.java
The page specification (just the asset for the XML-model)   QuickStartXml.page
The html template with the binding QuickStartXml.html
The XML-model quickstart-menu.xml

If you want to make the above examples run, you also need the icons (referred to in the asset definitions of QuickStart.page or in the quickstart-menu.xml respextively). You can download them (icons.zip) and unzip them in your context directory.

For more detailed information see the user manual or browse the API documentation

On the projects download area there is an example web application available that includes the above example among some others.

Change Log

Version 1.0.1

Version 1.0.2

Version 1.1

Version 1.2

Version 1.21

Version 2.0

Version 2.01

Version 2.11

Version 2.12

Version 2.20

Version 2.30