You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Raj Rajendran <ra...@gmail.com> on 2006/07/14 02:43:46 UTC

[OT?] Where can I find the Facelets taglib.xml file for htmLib ?

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 ?
Thanks !

Re: [OT?] Where can I find the Facelets taglib.xml file for htmLib ?

Posted by Mike Kienenberger <mk...@gmail.com>.
> 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 ?

I think everything is right except that you need to combine the two
facelets.LIBRARIES entries.

<param-value>/WEB-INF/htmLib.taglib.xml;/WEB-INF/tomahawk.taglib.xml</param-value>

Re: [OT?] Where can I find the Facelets taglib.xml file for htmLib ?

Posted by Raj Rajendran <ra...@gmail.com>.
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 <mk...@gmail.com> wrote:
>
> On 7/13/06, Raj Rajendran <ra...@gmail.com> 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.
>

Re: [OT?] Where can I find the Facelets taglib.xml file for htmLib ?

Posted by Mike Kienenberger <mk...@gmail.com>.
On 7/13/06, Raj Rajendran <ra...@gmail.com> 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.