Sunday, June 25, 2006

Tutorial on how to create a custom JSF component library available!

I have just created a tutorial on how to create your custom JSF
components library. It uses the MyFaces JSF
Components Archetype to generate the project structure and explains
how to implement a new component, by analysing the example component
that comes with the archetype.

You can find the tutorial here.

Hope you like it!

Wednesday, June 21, 2006

MyFaces Archetypes

Hi there, I will start blogging by talking about the MyFaces project and its maven archetypes. An archetype is a great mechanism to setup a new project from scratch using only one command. Sometimes it can be cumbersome to start a project, as you have to define the file structure and the dependencies on external libraries. Maven archetypes will do all this for you.

There are two different archetypes for MyFaces (and another archetype for Trinidad/ADF subproject, the set of components donated by Oracle). The two MyFaces archetypes are:
  • MyFaces Archetype: this archetype creates the basic structure for a project that will use MyFaces. It includes all the dependencies needed so you don't have to find them out. The best way to start a new web application.

  • JSF Components Archetype: aimed to those that want to setup a JSF component library project. This archetype will create a maven multi-module project, that contains the artifact for the JSF components and a webapp for the examples. Everything setup and prepared to be deployed out-of-the-box! Includes a very simple demo component, that can be used in any JSF implementation.

The information on how to use these archetypes can be found in this page of the MyFaces wiki.

Start coding now using JSF. These archetypes make life easier. There is no excuse!