The Source for Java Technology Collaboration
User: Password:



Manfred Riem

Manfred Riem's Blog

Temperature SPOT - Part 3

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

The following web page shows you how easy it is once the JSF component has been written to access the SunSPOT and get the temperature out of it using JSF.
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="temperature" uri="http://www.manorrock.com/tld/jsf/sunspot/temperature"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <f:view>
            This will show you the temperature outside at the location where
            this server is located: <temperature:temperature sunspotId="0014.4F01.0000.062B"/>
        </f:view>
    </body>
</html>
In order for this to work you will need the following classes: TemperatureComponent, TemperatureTag and TemperatureRenderer. Over the course of the next few days i'll post those classes.

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)





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