MyFaces Tomahawk

MyFaces provides a series of JSF components that go beyond the JSF specification. These components are 100% compatible with the Sun JSF 1.1 Reference Implementation (RI) or any other JSF 1.1 compatible implementation. Of course the custom components can also be used with the Apache MyFaces JSF implementation.

Although we try to make Tomahawk as "portable" as possible, not all Tomahawk releases are compatible with all MyFaces or Sun Mojarra (formerly RI) releases. A Tomahawk release is always compatible with the latest MyFaces Core release available at the time that Tomahawk version was released. For further information on compatibility between Tomahawk and other frameworks/libraries, please see the relevant wiki page.

Extended Components and Other "Goodies"

In addition to custom components not found in the JSF specification, the MyFaces components bundle also includes an "extended" version of some of the default components. These are basically components that exist in either the core or html tag libraries but additional functionality has been addded that goes beyond the specification.

  • Example: <t:inputText> - This is similar to the <h:inputText> component but it provides additional attributes such as forceId. When this attribute is true the HTML generated will used the id specified by the codeid/code attribute instead of the one normally generated by following the JSF specification.
  • Converters - MyFaces components project contains several custom objects that do not implement UIComponent. Some of these include objects that implement the Converter interface.
  • Tiles Support - MyFaces provides a custom solution to allow the use of Tiles and JSF together.

Requirements and Setup

  • Put the tomahawk.jar in your WEB-INF/lib directory (or in the classpath of your application server.)
  • Configure the MyFaces Extensions filter in your WEB-INF/web.xml file.
  • Add the following to your JSP page in order to use one of the MyFaces custom components:
    <%@ taglib uri="" prefix="t" %>
  • That's it! You're good to go.

Note that some specific Tomahawk components need additional libraries. For example, if you use the t:fileUpload component, then you will need to also add the commons-fileupload jarfile to your application classpath (eg in WEB-INF/lib). Components which need additional jars should describe that requirement in their documentation.

Note also that this webpage is part of the special site project for all the tomahawk modules (core, sandbox, examples, etc). Therefore the pages under the project documentation menu on the left refer just to this site, and not to the tomahawk library. For information about a specific tomahawk library (dependencies, unit test reports, etc.) select that library from the left menu bar then select the project documentation menu.