problem rendering custom elements in JBossTools HTML editor
nicolass Feb 18, 2010 9:42 AMHi
As described in this short video tutorial:
http://docs.jboss.org/tools/movies/demos/facelets_support_in_vpe/facelets_support_in_vpe.htm
I tried to add the custom elements of my project.
What I already had was a tld file with the elements described in it and their attributes.
So i created a new xml file (data.taglib.xml) to add my element and prepare it to be rendered.
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
<namespace>http://www.company.com/product/data</namespace>...
...
<tag>
<tag-name>dataTable</tag-name>
<source>components/dataTable.xhtml</source>
</tag>
...
...
as you can see i have a components folder. there i saved my xhtml ( that should be shown in the visual part instead of the tag-name)
here s the content of the dataTable.xhtml
<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<ui:component>
<h:outputText value="test" />
</ui:component>
</html>
well now it should work
i created a new page with the following content:
<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:spoc="http://www.company.com/product/data"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:t="http://myfaces.apache.org/tomahawk">
<head></head>
<body>
<div>
<spoc:dataTable/>
</div>
</body>
</html>
it includes the dataTable element.
well now my problem is that the element isn't rendered in the visual editor part.
if i ctrl-right click on the url i get directed to the tld file
if i click on the dataTable element i get to the xml file.
Is there any bug that describes this?
or any fault by myself?