java/cewolf-1.0/src/site/tutorial/step4.html
changeset 4 249560bcc466
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/cewolf-1.0/src/site/tutorial/step4.html	Sun Mar 01 11:06:49 2009 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>Cewolf Tutorial(4): Define the chart in your JSP</title>
     1.8 +  <meta name="author" content="Guido Laures">
     1.9 +  <link href="../cewolf.css" rel="stylesheet" type="text/css">
    1.10 +</head>
    1.11 +<body>
    1.12 +<h1>Tutorial: Step 4</h1>
    1.13 +<h2>Define the chart in your JSP</h2>
    1.14 +<pre>&lt;%@page contentType="text/html"%&gt;<br>&lt;%@taglib uri='/WEB-INF/cewolf.tld' prefix='cewolf' %&gt;<br>&lt;HTML&gt;<br>&lt;BODY&gt;<br>&lt;H1&gt;Page View Statistics&lt;/H1&gt;<br>&lt;HR&gt;<br>&lt;jsp:useBean id="pageViews" class="de.laures.cewolf.example.PageViewCountData"/&gt;<br>&lt;cewolf:chart <br>    id="line" <br>    title="Page View Statistics" <br>    type="line" <br>    xaxislabel="Page" <br>    yaxislabel="Views"&gt;<br>    &lt;cewolf:data&gt;<br>        &lt;cewolf:producer id="pageViews"/&gt;<br>    &lt;/cewolf:data&gt;<br>&lt;/cewolf:chart&gt;<br>&lt;p&gt;<br>&lt;cewolf:img chartid="line" renderer="cewolf" width="400" height="300"/&gt;<br>&lt;P&gt;<br>&lt;/BODY&gt;<br>&lt;/HTML&gt;<br></pre>
    1.15 +<p> As you can see there are different tags of the cewolf taglib
    1.16 +involved. The first &lt;cewolf:chart&gt; tag defines a chart with all
    1.17 +its parameters. The concrete rendering is handled by the
    1.18 +&lt;cewolf:img&gt; tag which adds the correct &lt;img&gt; tag in the
    1.19 +rendered HTML page. The connection between both cewolf tags inside the
    1.20 +JSP is specified by using the same <tt>id</tt> attributes. </p>
    1.21 +<p> When calling this JSP from a client browser you should see the page
    1.22 +view statistic chart. If you got a broken image have a look at your
    1.23 +container's log files. </p>
    1.24 +<p> <a href="step5.html">Step 5: Create ImageMap and Tooltip
    1.25 +Information&gt;&gt;</a> </p>
    1.26 +<a height="30" target="new" href="http://sourceforge.net"><img
    1.27 + alt="SourceForge Logo" border="0" height="30"
    1.28 + src="http://sourceforge.net/sflogo.php?group_id=57282&amp;type=5"></a>
    1.29 +</body>
    1.30 +</html>