Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » XHTML Editor and JSF Custom Component and Namespace resolution problem(Web editor can't find the library tag on external project.)
icon5.gif  XHTML Editor and JSF Custom Component and Namespace resolution problem [message #506205] Wed, 06 January 2010 14:27 Go to next message
Mauro Monti is currently offline Mauro MontiFriend
Messages: 2
Registered: January 2010
Junior Member
Hi everybody,

I have a problem developing custom jsf component, particulary with the resolution of the namespace of my custom components library in design time.

I have 2 projects.

A java project (CustomComponent) with this structure:
[CustomComponent]
+ src/com.foo.components
+ component clases, renderers, etc.
+ META-INF [dir]
+ facelet
+ custom-component.taglib.xml
+ faces-config.xml
+ custom-component.tld

A web project to test my library.
[ComponentShowcase]
+ src/com.foo.mbeans
+ META-INF (empty)
+ WEB-INF
+ lib
+ web.xml
+ faces-config.xml
+ home.xhtml

So, in the web project i have defined the dependencies (ComponentShowcase have a reference to CustomComponent project). When i edit the home.xhtml file, and add the namespace (defined in the custom-component.taglib.xml)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:lab="http://www.components.com/components">
    <head>
        <title>
	        <ui:insert name="title">Default title</ui:insert>
        </title>
    </head>
    <body></body>
</html>


The editor validate the namespace and show: "Can't find facelet tag library for uri http://www.components.com/components"
The only solution that i have found for this problem is copying the custom-component.taglib.xml and custom-component.tld to the META-INF directory of the web project. With these files in the META-INF directory, can i reference my custom tags in the xhtml editor.

So ... my question is:
if it's possible avoid to copy those files to the web project and make a reference to the java project, to make the editor found the tag library (my idea is make a jar to distribute my components) ?

Thanks in advance!.
Mauro.


Re: XHTML Editor and JSF Custom Component and Namespace resolution problem [message #515718 is a reply to message #506205] Fri, 19 February 2010 22:05 Go to previous message
Raghu Srinivasan is currently offline Raghu SrinivasanFriend
Messages: 265
Registered: July 2009
Senior Member
I have launched a bug to track this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=303376

Please note that we will address it the upcoming WTP Helios release as part of support for JSF 2.0.


Raghu Srinivasan,
Project Lead - JSF
Previous Topic:JSF Facelets Development
Next Topic:XHTML Editor and JSF Custom Component and Namespace resolution problem
Goto Forum:
  


Current Time: Thu Nov 27 02:08:36 GMT 2014

Powered by FUDForum. Page generated in 0.03500 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software