The Source for Java Technology Collaboration
User: Password:



Manfred Riem

Manfred Riem's Blog

Temperature SPOT - Part 7

Posted by mriem on August 31, 2007 at 08:00 PM | Comments (0)

In order for the JSF component to work it needs to register itself to the JSF runtime. The configuration to do so is described below.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    
<faces-config>
    <component>
        <component-type>com.manorrock.jsf.sunspot.temperature.TemperatureComponent</component-type>
  	<component-class>com.manorrock.jsf.sunspot.temperature.TemperatureComponent</component-class>
    </component>
    <render-kit>
        <renderer>
            <description>Renderer for the temperature component.</description>
            <component-family>com.manorrock.jsf.sunspot.temperature.TemperatureFamily</component-family>
            <renderer-type>com.manorrock.jsf.sunspot.temperature.TemperatureRenderer</renderer-type>
            <renderer-class>com.manorrock.jsf.sunspot.temperature.TemperatureRenderer</renderer-class>
        </renderer>
    </render-kit>
</faces-config>
And beyond that you will need to define the taglibrary to use the tag as well. The code below shows you how this is done for this taglibrary.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" 
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    
<taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>temperature</short-name>
    <uri>http://www.manorrock.com/tld/jsf/sunspot/temperature</uri>
    <tag>
        <name>temperature</name>
        <tag-class>com.manorrock.jsf.sunspot.temperature.TemperatureTag</tag-class>
        <attribute>
            <name>sunspotId</name>
            <required>true</required>
        </attribute>
    </tag>
</taglib>
This concludes the series about the JSF temperature SPOT. If you have any questions feel free to drop me an email or add comments to this blog.

Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds