Facelet WebApp will not work properply

Monday 12th May, 2008

As I stumbled again in a problem I saw before during developing a JSF app using faclets and myfaces I will write my solution down here:

Problem:

If you call a page which is properply workign fine more then once you get the error:

An Error Occurred:
Component ID dataForm_worklist:j_id37:j_id66  has already been found in the view....

As I now spent a long time to solve this issue I will write down here what I have done to get it work:

Solution:

1.) make sure that in your faces-config.xml the default ressource bundle is defined.
   in the application tag add a tag "message-bundle" with the name of the default message bundle

 	 

2.)  make sure the you use the newest Versions of myFaces and Faclets!
  everything works fine if I am using the following versions:

  • jsf-facelets-1.1.13.jar
  • myfaces-api-1.2.0.jar
  • myfaces-impl-1.2.0.jar
  • tomahawk-1.1.6.jar

As I am using maven (which is really cool)  I add the following dependencies into my pom.xml:

		groupId=	org.apache.myfaces.core
artifactId= myfaces-api
version=1.2.0

groupId= org.apache.myfaces.core
artifactId= myfaces-impl
version=1.2.0

groupId=org.apache.myfaces.tomahawk
artifactId= tomahawk
version=1.1.6

groupId=com.sun.facelets
artifactId= jsf-facelets
version=1.1.13
  

Comments [1]