Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsf composite component in dependency  RSS feed

 
serafino lillo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a java application project called mycomposites, i created xhtml with a composite component interface and implementation in
mycomposites/src/main/resources/testcomponents/myComponent.xhtml

Then I created a new project testmycomposites added mycomposites as dependency. Here is the source of an xhtml that should use myComponent:




However running project, I get error:
<tp:myComponent> Tag Library supports namespace: http://java.sun.com/jsf/composite/testcomponents, but no tag was defined for name: myComponent

If i put the same custom component in resources/testcomponents folder of the same project everything works fine.

I can't find any example in wich custom composite components are located in a dependency.

Is it wrong xml namespace or what?

Thanks in advance for reply.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might help:

http://www.mkyong.com/jsf2/composite-components-in-jsf-2-0/
 
serafino lillo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started from there, but in that example the composite component is not added as a dependency, but it is put in the same project.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are saying that you are bundling this component in a separate jar to be included in other projects, then you will have to include a meta-inf file in the component's jar to help JSF properly register it.

I'm not free to locate the details on that right now, but you might have luck with a web search.
 
serafino lillo
Greenhorn
Posts: 13
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved moving myComponent.xhtml

from

mycomposites/src/main/resources/testcomponents/myComponent.xhtml

to

mycomposites/src/main/resources/META-INF/resources/testcomponents/myComponent.xhtml

Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!