-
1. Re: Custom JSF tags
pmuir Jan 5, 2007 8:56 AM (in response to paulo.dangelo)Looks to me like you are using facelets. In that case you need to wire your custom components as for facelets not JSP. Take a look at the facelets documentation which explains how to do this.
-
2. Re: Custom JSF tags
norman.richards Jan 5, 2007 9:33 AM (in response to paulo.dangelo)You need to check the facelets documentation to see how to declare facelets taglibs. It doesn't use a tld file.
-
3. Re: Custom JSF tags
jweidner Jan 5, 2007 11:25 AM (in response to paulo.dangelo)Here's a facelet tag example:
http://wiki.java.net/bin/view/Projects/FaceletsTaglibsNbsp -
4. Re: Custom JSF tags
paulo.dangelo Jan 5, 2007 1:01 PM (in response to paulo.dangelo)Nice .. Thanks for all the replies ?.
I saw the facelet tag example but have one doubt: How do I represent a div html tag similar to the nbsp showed there? Would it be something like this?
<!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:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition>
<f:verbatim>??? What goes here? ???</f:verbatim>
</ui:composition> -
5. Re: Custom JSF tags
paulo.dangelo Jan 5, 2007 2:08 PM (in response to paulo.dangelo)ok ... problem solved. No need for a xhtml file.
I keep all code as initially described in the first post but, instead of using the tld descriptor, I use the xml one as this:
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"facelet-taglib_1_0.dtd">
<facelet-taglib>
http://www.xxxxx.com/jsf
<tag-name>div</tag-name>
<component-type>javax.faces.Panel</component-type>
<renderer-type>com.xxxxx.framework.view.jsf.components.Div</renderer-type>
</facelet-taglib>
and the reference on web.xml:
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>
/WEB-INF/xxxxx.taglib.xml
</param-value>
</context-param>
Thank you all for your help.
Paulo.