Okay. so I followed these steps:

1. Looked at the getComponentType and getRendererType methods in the tag class:
package com.exadel.htmLib.tags ;


// Referenced classes of package com.exadel.htmLib.tags:
//            HtmLibBaseTag

public class DivTag extends HtmLibBaseTag
{

    public DivTag()
    {
    }

    public String getComponentType()
    {
        return "htmLib.div";
    }

    public String getRendererType()
    {
        return null;
    }
}

2. Created a htmLib.taglib.xml, which looks like this: (am using only the div tag)
<?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://jsftutorials.net/htmLib</namespace>

    <tag>
        <tag-name>div</tag-name>
        <component>
            <component-type> htmLib.div</component-type>         
        </component>
    </tag>
</facelet-taglib>

3. Added this to web.xml
<context-param>
            <param-name>facelets.LIBRARIES</param-name>
            <param-value>/WEB-INF/htmLib.taglib.xml</param-value>
        </context-param>
        <context-param>
            <param-name>facelets.LIBRARIES</param-name>
            <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
        </context-param>

4. But when the page is rendered, it still comes as <htm:div> ....</htm:div>
and not <div> ...</div> like I expected.

What else could I be doing wrong ?

Thanks !!!


On 7/14/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
On 7/13/06, Raj Rajendran <[EMAIL PROTECTED]> wrote:
> I am trying to use htmLib
> http://www.jsftutorials.net/htmLib/ along with Facelets,
> but can't seem to find a sample or full version of htmLib.taglib.xml
>  Any ideas where I can get it ?

Add the taglib to the
http://wiki.java.net/bin/view/Projects/FaceletsTaglibFiles page when
you've either found one or created one.

You should be able to trivially-create one for any component without
methodbindings.  See the top of
http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk for simple
directions.

Reply via email to