You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/07/04 00:49:00 UTC

svn commit: r418868 [2/2] - in /tapestry/tapestry4/trunk: ./ framework/src/java/org/apache/tapestry/html/ src/site/ src/site/resources/css/ src/site/resources/images/ src/site/xdoc/ src/site/xdoc/QuickStart/ src/site/xdoc/exampleapps/ src/site/xdoc/exa...

Modified: tapestry/tapestry4/trunk/src/site/xdoc/QuickStart/helloworld.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/QuickStart/helloworld.xml?rev=418868&r1=418867&r2=418868&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/QuickStart/helloworld.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/QuickStart/helloworld.xml Mon Jul  3 15:48:59 2006
@@ -1,62 +1,65 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- 
-   Copyright 2005 The Apache Software Foundation
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
+    Copyright 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
 -->
 <document>
-<properties>
-<title>Quick Start: Hello World</title>
-</properties>
-<body>
-
-<p>
-In this tutorial, we'll cover setting up the most basic Tapestry application,
-a simple "Hello World" application that displays the current time. We'll then
-extend it just a bit, adding a touch of interactivity.
-</p>
-
-<p>
-The final source for this tutorial is packaged as <strong>helloworld.tar.gz</strong>.
-</p>
-
-<section name="Tapestry Application Basics">
-  
-  
-<p>
-Our first application will look like the following when it runs:
-</p>  
-
-<img src="../images/QuickStart/helloworld1.png" alt="HelloWorld step 1 screen shot."/>
-  
-<p>
-Tapestry applications always include a page named "Home".  The Home page is the first page
-displayed by the application, when it is first started (that is, when the client web browser
-first accesses the starting URL).
-</p>  
-
-<p>
-Tapestry pages are always a combination of a Java class and a template (we could say, "an HTML template",
-but Tapestry is not limited to just HTML).  In many cases, Tapestry will use a built-in Java class
-when you don't provide one; for a trivial page like ours, we don't need to supply a Java class at all.
-</p>
-
-<p>
-  We'll start with the HTML template then, which is a file named Home.html in the root of the web application context.
-  In the project, it is stored as src/context/Home.html:
-</p>
+    <properties>
+        <title>Quick Start: Hello World</title>
+    </properties>
+    <body>
+
+        <section name="Quick Start: Hello World">
+        <p>
+            In this tutorial, we'll cover setting up the most basic Tapestry application, a simple
+            "Hello World" application that displays the current time. We'll then extend it just a
+            bit, adding a touch of interactivity.
+        </p>
+        
+        <p>
+            The final source for this tutorial is packaged as
+            <strong>helloworld.tar.gz</strong>
+            .
+        </p>
+        
+        <section name="Tapestry Application Basics">
+
+
+            <p>Our first application will look like the following when it runs:</p>
+
+            <img src="../images/QuickStart/helloworld1.png" alt="HelloWorld step 1 screen shot." />
+
+            <p>
+                Tapestry applications always include a page named "Home". The Home page is the first
+                page displayed by the application, when it is first started (that is, when the
+                client web browser first accesses the starting URL).
+            </p>
+
+            <p>
+                Tapestry pages are always a combination of a Java class and a template (we could
+                say, "an HTML template", but Tapestry is not limited to just HTML). In many cases,
+                Tapestry will use a built-in Java class when you don't provide one; for a trivial
+                page like ours, we don't need to supply a Java class at all.
+            </p>
+
+            <p>
+                We'll start with the HTML template then, which is a file named Home.html in the root
+                of the web application context. In the project, it is stored as
+                src/context/Home.html:
+            </p>
 
-<source xml:space="preserve">
+            <source xml:space="preserve">
 &lt;html&gt;
   &lt;head&gt;
     &lt;title&gt;Tutorial: HelloWorld&lt;/title&gt;
@@ -67,21 +70,24 @@
 &lt;/html&gt;
 </source>
 
-<p>
-There's nothing special in this HTML template, nothing dynamic (not yet, anyway).  We could access it
-as http://localhost:8080/helloworld/Home.html and see the same thing; but notice that in the screen shot
-the URL is <a href="http://localhost:8080/hellworld/app">http://localhost:8080/hellworld/app</a>.  
-That means that a servlet, mapped to the /app path
-within the web application, was responsible for the output you can see in the web browser.
-</p>
-
-<p>
-Tapestry applications always use a specific servlet class provided with the framework. 
-This is defined in the web deployment descriptor, web.xml.
-This file is stored in the project as src/context/WEB-INF/web.xml:
-</p>
+            <p>
+                There's nothing special in this HTML template, nothing dynamic (not yet, anyway). We
+                could access it as http://localhost:8080/helloworld/Home.html and see the same
+                thing; but notice that in the screen shot the URL is
+                <a href="http://localhost:8080/hellworld/app">
+                    http://localhost:8080/hellworld/app
+                </a>
+                . That means that a servlet, mapped to the /app path within the web application, was
+                responsible for the output you can see in the web browser.
+            </p>
+
+            <p>
+                Tapestry applications always use a specific servlet class provided with the
+                framework. This is defined in the web deployment descriptor, web.xml. This file is
+                stored in the project as src/context/WEB-INF/web.xml:
+            </p>
 
-<source xml:space="preserve">
+            <source xml:space="preserve">
 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;!DOCTYPE web-app
       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
@@ -100,51 +106,58 @@
   &lt;/servlet-mapping&gt;
 &lt;/web-app&gt;
 </source>
-  
-<p>
-Here we've given our application a name, "app".  We're using the standard Tapestry ApplicationServlet class as
-our servlet, and mapped it to the path /app.  The name you choose for you application is relatively unimportant, and 
-Tapestry will adapt to whatever name you do choose.  
-</p>  
-
-<p>
-The path, on the other hand, needs to be /app.  This is not hard-coded into Tapestry, but does require
-a small amount of configuration if you choose to use another path. As well see in a later
-tutorial, Tapestry can be quite sophisticated in terms of building application URLs, so don't 
-be too concerned about this aspect of Tapestry just yet.
-</p>
-
-<p>
-That's all there is to HelloWorld in this phase.  No Java code at all. Before going on to bigger and better things, we're going
-to add a little bit to this application, to give you a slightly more realistic feel for Tapestry ... but we'll still
-avoid writing any Java code at all.
-</p>
-
-</section>
-
-<section name="Adding dynamic output">
-  
-  
-<p>
-We're going to change the Home page to display the current date and time. It will look something like
-this:
-</p>
-  
-<img src="../images/QuickStart/helloworld2.png" alt="HelloWorld showing current date/time"/>
-
-<p>
-In Tapestry, pretty much any time anything dynamic occurs, there's going to be a <em>component</em> involved. Tapestry components
-are much like Tapestry pages ... they consist of a template and a Java class (purists may note that there may be an XML
-file to tie those together, and that the template and the Java class are both optional -- more on this
-later).
-</p>
-
-<p>
-Tapestry components "hide" inside the HTML template.  They look like ordinary HTML tags, but have 
-extra attributes in them, often with unusual values.  The revised Home.html template:
-</p>
 
-<source xml:space="preserve">
+            <p>
+                Here we've given our application a name, "app". We're using the standard Tapestry
+                ApplicationServlet class as our servlet, and mapped it to the path /app. The name
+                you choose for you application is relatively unimportant, and Tapestry will adapt to
+                whatever name you do choose.
+            </p>
+
+            <p>
+                The path, on the other hand, needs to be /app. This is not hard-coded into Tapestry,
+                but does require a small amount of configuration if you choose to use another path.
+                As well see in a later tutorial, Tapestry can be quite sophisticated in terms of
+                building application URLs, so don't be too concerned about this aspect of Tapestry
+                just yet.
+            </p>
+
+            <p>
+                That's all there is to HelloWorld in this phase. No Java code at all. Before going
+                on to bigger and better things, we're going to add a little bit to this application,
+                to give you a slightly more realistic feel for Tapestry ... but we'll still avoid
+                writing any Java code at all.
+            </p>
+
+        </section>
+
+        <section name="Adding dynamic output">
+
+
+            <p>
+                We're going to change the Home page to display the current date and time. It will
+                look something like this:
+            </p>
+
+            <img src="../images/QuickStart/helloworld2.png"
+                alt="HelloWorld showing current date/time" />
+
+            <p>
+                In Tapestry, pretty much any time anything dynamic occurs, there's going to be a
+                <em>component</em>
+                involved. Tapestry components are much like Tapestry pages ... they consist of a
+                template and a Java class (purists may note that there may be an XML file to tie
+                those together, and that the template and the Java class are both optional -- more
+                on this later).
+            </p>
+
+            <p>
+                Tapestry components "hide" inside the HTML template. They look like ordinary HTML
+                tags, but have extra attributes in them, often with unusual values. The revised
+                Home.html template:
+            </p>
+
+            <source xml:space="preserve">
 &lt;html&gt;
   &lt;head&gt;
     &lt;title&gt;Tutorial: HelloWorld&lt;/title&gt;
@@ -161,188 +174,239 @@
 &lt;/html&gt;
 </source>
 
-<p>
-The &lt;span&gt; tag is the placeholder within the template for the component.  The special
-attribute, jwcid, is Tapestry's clue that this is a component, and not just ordinary HTML.
-</p>
-  
-<p>The "@Insert" value for the jwcid attribute can be thought of as "instance of
-the <a href="site:Insert">Insert</a> component".  Insert  is one of many built-in Tapestry components. This isn't quite the Java class; it is
-a component type, which is used by Tapestry to find out about the component, such as what parameters
-can be configured and what Java class contains the logic for the component.  Again, more on that later.
-</p>
-
-<p>
-Before we get to the value parameter, a word about the <em>body</em> of the component.  The body
-is the portion of the template enclosed by the component's start (&lt;span&gt;) and end (&lt;/span&gt;)
-tags.  Ultimately, the component itself determines when, if, or how many times it will render
-its body ("render" is the verb used throughout Tapestry meaning "write HTML output").
-</p>
-
-<p>
- The Insert  component expressly <em>does not</em> render its body.  Any text inside the
- component's body is quietly discarded at runtime. We could, in fact, abbreviate the
- component within the template to
- just <code>&lt;span jwcid="@Insert" value="ognl:new java.util.Date()"/&gt;</code> and not put
- any text inside its tags.  So why did we?
-</p>
-
-<p>
-  The answer is <em>previewability</em>, that is, the ability to see, at least approximately, what the
-  page will look like <em>without</em> running the actual application.  You can load the Home.html
-  file into a web browser, or a specialized editor such as Dreamweaver or HomeSite, and see what it
-  looks like.  For example, if we bypass the Tapestry servlet and access the template directly,
-  we see the following:
-</p>
-
-<img src="../images/QuickStart/helloworld3.png" alt="HelloWorld Home.html template"/>
-
-<p>
- That <em>provisional text</em>, "June 26 2005" is not <em>exactly</em> what the application will
- display at runtime ... but it's close enough; it's not blank and it's approximately right. In a real
- application with real style sheets and layouts, this would be enough validate that the layout
- of the running application was correct.
-</p>
-
-<p>
-<strong>Note:</strong>
-<br/>
-  This side track, about previewability, is actually one of the cornerstones of Tapestry:
-  a <em>clean</em> seperation between logic and content. A non-Java HTML developer could edit
-  this template and make significant changes and validate them in their editor of choice without
-  involving a Java developer. As long as the HTML side of the team honors the components,
-  the tags with a jwcid attribute, and doesn't make changes to <em>those</em> elements, the rest
-  of the HTML template can be freely editted. It is only at the junction between content
-  and runtime behavior, that is, <em>inside</em> components, that HTML and Java developers need to work together.
-</p>
-
-<p>
-  So, what does <code>value="ognl:new java.util.Date()"</code> mean?  
-  Let's start with the attribute value, <code>ognl:new java.util.Date</code>.  The "ognl:" prefix
-  signals to Tapestry that this is an expression to be evaluated, rather than a ordinary, literal
-  string. If we did want the Insert to always render the same literal string, such as "Tapestry Rocks!", 
-  we wouldn't need the prefix, we could just write
- <code>value="Tapestry Rocks!"</code>.
-</p>  
-  
-<p>
-OGNL is the Object Graph Navigation Language, an open source expression language used by several
-open-source projects, including Tapestry, <a href="http://opensymphony.com/webwork/">WebWork</a> and <a href="http://springframework.org/">Spring</a>.  OGNL has some astounding
-capabilities, not just reading and updating object properties, but also includes support for creating
-new objects entirely (as here), as well as creating lists, maps and arrays of objects.
-</p>
-
-<p>
-Here, evaluating the expression results in a new instance of the java.util.Date class. This Date
-instance is <em>bound</em> to the value parameter of the Insert component. "Bound" is another
-specialized Tapestry term, one that concerns the relationship between a component parameter and
-a property (or expression) of its container.  Here, the component is the Insert component,
-the container is the Home page, and the expression is <code>new java.util.Date</code>.  Binding might
-look like just an assignment of a property of the Insert component, but is
-a bit more; components often use bindings to <em>update</em> properties of their container, something we'll see 
-when discussing the form element components.
-</p>
-
-<p>
-  In the Java code for the Insert component is the logic that obtains value parameter and
-  converts it into into a string that is rendered into the response.
-</p>
-
-  <p>
- So, the expression provides the Date instance, the value parameter gives the Insert component access
- to that value, and the Insert component provides the logic for converting that Date into a string
- and having it show up on the rendered page. Every time the Insert component renders, it will
- re-read its value parameter, causing the expression to be evaluated once more, and a new Date instance
- to be created.   You can see this by hitting your browser's refresh button repeatedly; the displayed date will
- keep changing.
-</p>
-
-<p>
-  In the next section, we'll see how to create a link to get the displayed date to be updated.
-</p>
-
-</section>
-
-<section name="Creating Links">
-  
-
-<p>
-  We're going to extend the application once more, adding a refresh link that we can click
-  instead of using the browser's refresh button. The end result looks like:
-</p>  
-
-<img src="../images/QuickStart/helloworld4.png" alt="HelloWorld with refresh link"/>
-
-<p>
-  We created this new link by adding the following to Home.html:
-</p>
+            <p>
+                The &lt;span&gt; tag is the placeholder within the template for the component. The
+                special attribute, jwcid, is Tapestry's clue that this is a component, and not just
+                ordinary HTML.
+            </p>
+
+            <p>
+                The "@Insert" value for the jwcid attribute can be thought of as "instance of the
+                <a href="site:Insert">Insert</a>
+                component". Insert is one of many built-in Tapestry components. This isn't quite the
+                Java class; it is a component type, which is used by Tapestry to find out about the
+                component, such as what parameters can be configured and what Java class contains
+                the logic for the component. Again, more on that later.
+            </p>
+
+            <p>
+                Before we get to the value parameter, a word about the
+                <em>body</em>
+                of the component. The body is the portion of the template enclosed by the
+                component's start (&lt;span&gt;) and end (&lt;/span&gt;) tags. Ultimately, the
+                component itself determines when, if, or how many times it will render its body
+                ("render" is the verb used throughout Tapestry meaning "write HTML output").
+            </p>
+
+            <p>
+                The Insert component expressly
+                <em>does not</em>
+                render its body. Any text inside the component's body is quietly discarded at
+                runtime. We could, in fact, abbreviate the component within the template to just
+                <code>&lt;span jwcid="@Insert" value="ognl:new java.util.Date()"/&gt;</code>
+                and not put any text inside its tags. So why did we?
+            </p>
+
+            <p>
+                The answer is
+                <em>previewability</em>
+                , that is, the ability to see, at least approximately, what the page will look like
+                <em>without</em>
+                running the actual application. You can load the Home.html file into a web browser,
+                or a specialized editor such as Dreamweaver or HomeSite, and see what it looks like.
+                For example, if we bypass the Tapestry servlet and access the template directly, we
+                see the following:
+            </p>
+
+            <img src="../images/QuickStart/helloworld3.png" alt="HelloWorld Home.html template" />
+
+            <p>
+                That
+                <em>provisional text</em>
+                , "June 26 2005" is not
+                <em>exactly</em>
+                what the application will display at runtime ... but it's close enough; it's not
+                blank and it's approximately right. In a real application with real style sheets and
+                layouts, this would be enough validate that the layout of the running application
+                was correct.
+            </p>
+
+            <p>
+                <strong>Note:</strong>
+                <br />
+                This side track, about previewability, is actually one of the cornerstones of
+                Tapestry: a
+                <em>clean</em>
+                seperation between logic and content. A non-Java HTML developer could edit this
+                template and make significant changes and validate them in their editor of choice
+                without involving a Java developer. As long as the HTML side of the team honors the
+                components, the tags with a jwcid attribute, and doesn't make changes to
+                <em>those</em>
+                elements, the rest of the HTML template can be freely editted. It is only at the
+                junction between content and runtime behavior, that is,
+                <em>inside</em>
+                components, that HTML and Java developers need to work together.
+            </p>
+
+            <p>
+                So, what does
+                <code>value="ognl:new java.util.Date()"</code>
+                mean? Let's start with the attribute value,
+                <code>ognl:new java.util.Date</code>
+                . The "ognl:" prefix signals to Tapestry that this is an expression to be evaluated,
+                rather than a ordinary, literal string. If we did want the Insert to always render
+                the same literal string, such as "Tapestry Rocks!", we wouldn't need the prefix, we
+                could just write
+                <code>value="Tapestry Rocks!"</code>
+                .
+            </p>
+
+            <p>
+                OGNL is the Object Graph Navigation Language, an open source expression language
+                used by several open-source projects, including Tapestry,
+                <a href="http://opensymphony.com/webwork/">WebWork</a>
+                and
+                <a href="http://springframework.org/">Spring</a>
+                . OGNL has some astounding capabilities, not just reading and updating object
+                properties, but also includes support for creating new objects entirely (as here),
+                as well as creating lists, maps and arrays of objects.
+            </p>
+
+            <p>
+                Here, evaluating the expression results in a new instance of the java.util.Date
+                class. This Date instance is
+                <em>bound</em>
+                to the value parameter of the Insert component. "Bound" is another specialized
+                Tapestry term, one that concerns the relationship between a component parameter and
+                a property (or expression) of its container. Here, the component is the Insert
+                component, the container is the Home page, and the expression is
+                <code>new java.util.Date</code>
+                . Binding might look like just an assignment of a property of the Insert component,
+                but is a bit more; components often use bindings to
+                <em>update</em>
+                properties of their container, something we'll see when discussing the form element
+                components.
+            </p>
+
+            <p>
+                In the Java code for the Insert component is the logic that obtains value parameter
+                and converts it into into a string that is rendered into the response.
+            </p>
+
+            <p>
+                So, the expression provides the Date instance, the value parameter gives the Insert
+                component access to that value, and the Insert component provides the logic for
+                converting that Date into a string and having it show up on the rendered page. Every
+                time the Insert component renders, it will re-read its value parameter, causing the
+                expression to be evaluated once more, and a new Date instance to be created. You can
+                see this by hitting your browser's refresh button repeatedly; the displayed date
+                will keep changing.
+            </p>
+
+            <p>
+                In the next section, we'll see how to create a link to get the displayed date to be
+                updated.
+            </p>
+
+        </section>
+
+        <section name="Creating Links">
+
+
+            <p>
+                We're going to extend the application once more, adding a refresh link that we can
+                click instead of using the browser's refresh button. The end result looks like:
+            </p>
+
+            <img src="../images/QuickStart/helloworld4.png" alt="HelloWorld with refresh link" />
+
+            <p>We created this new link by adding the following to Home.html:</p>
 
-<source xml:space="preserve">
+            <source xml:space="preserve">
 &lt;p&gt;
   &lt;a href="#" jwcid="@PageLink" page="Home"&gt;refresh&lt;/a&gt;
 &lt;/p&gt;
 </source>
 
-<p>
-  Again, anything dynamic in Tapestry is going to involve a component; here it's the
-  <a href="site:PageLink">PageLink</a> component, one of a family of components that generate callback links into a
-  Tapestry application.
-</p>
-
-<p>
-  Tapestry automatically creates a URL for this; you can see this URL in the screenshot:
-  http://localhost:8080/workbench/app?page=Home&amp;service=page.  That URL provides two
-  critical pieces of information: service=page means "render a page", and page=Home identifies which
-  page to render.
-</p>
-
-<p>
-  <em>Do I really need a component for that? </em> You might be tempted to change the template to:
-</p>
+            <p>
+                Again, anything dynamic in Tapestry is going to involve a component; here it's the
+                <a href="site:PageLink">PageLink</a>
+                component, one of a family of components that generate callback links into a
+                Tapestry application.
+            </p>
+
+            <p>
+                Tapestry automatically creates a URL for this; you can see this URL in the
+                screenshot: http://localhost:8080/workbench/app?page=Home&amp;service=page. That URL
+                provides two critical pieces of information: service=page means "render a page", and
+                page=Home identifies which page to render.
+            </p>
+
+            <p>
+                <em>Do I really need a component for that?</em>
+                You might be tempted to change the template to:
+            </p>
 
-<source xml:space="preserve">
+            <source xml:space="preserve">
   &lt;a href="/app?service=page&amp;amp;page=Home"&gt;refresh&lt;/a&gt;
 </source>
 
-<p>
-  This is a <strong>bad idea</strong>. Tapestry is doing more than spewing out a URL, it's
-  <em>session encoding</em> the URL for you<sup>1</sup> and may be doing other useful things that
-  we'll see later.  Further, second guessing Tapestry's URLs is never a good idea; the PageLink component
-  will be around in the next release of Tapestry, but the URL format may change between releases.
-</p>
-
-<p>
-  Another question: what's with the href attribute in the attribute?  What does <code>href="#"</code> mean?
-  This is another side to previewability:  to preview this page, the link
-  ultimately generated by the PageLink needs to preview as a <em>link</em>.  An &lt;a&gt; tag
-  without an href attribute is an <em>anchor</em>.  Again, this is a distinction that is more visible
-  in real applications, supported by a style sheet.
-</p>
-
-<p>
-  The href provided in the HTML template is simply discarded in favor of the href attribute
-  generated inside the PageLink components (/app?service=...). You can actually
-  mix and match these component-generated attributes with extra attributes
-  provided in the template; these are called <em>informal parameters</em>, and are covered in a later
-    tutorial.
-</p>
-
-</section>
-
-<section name="Next: DirectLink">
-  
-  
-<p>
-  That covers the PageLink component, at least for now.  Next up:  the <a href="directlink.html">DirectLink Tutorial</a>.
-</p>
-</section>
-
-<p>
-  <sup>1</sup> Session encoding is an aspect of the Servlet API.  Encoding a URL adds information about
-  the server-side session (the HttpSession) if there is one. Although this information can
-  be obtained via HTTP cookies, not all users have cookies enabled in their browser. The servlet
-  specification encourages you to always encode your URLs, and this is simply done for you in Tapestry.
-  It's another example of the basic Tapestry principle: <em>make the simplest choice the correct choice</em>.
-</p>
-</body>
+            <p>
+                This is a
+                <strong>bad idea</strong>
+                . Tapestry is doing more than spewing out a URL, it's
+                <em>session encoding</em>
+                the URL for you
+                <sup>1</sup>
+                and may be doing other useful things that we'll see later. Further, second guessing
+                Tapestry's URLs is never a good idea; the PageLink component will be around in the
+                next release of Tapestry, but the URL format may change between releases.
+            </p>
+
+            <p>
+                Another question: what's with the href attribute in the attribute? What does
+                <code>href="#"</code>
+                mean? This is another side to previewability: to preview this page, the link
+                ultimately generated by the PageLink needs to preview as a
+                <em>link</em>
+                . An &lt;a&gt; tag without an href attribute is an
+                <em>anchor</em>
+                . Again, this is a distinction that is more visible in real applications, supported
+                by a style sheet.
+            </p>
+
+            <p>
+                The href provided in the HTML template is simply discarded in favor of the href
+                attribute generated inside the PageLink components (/app?service=...). You can
+                actually mix and match these component-generated attributes with extra attributes
+                provided in the template; these are called
+                <em>informal parameters</em>
+                , and are covered in a later tutorial.
+            </p>
+
+        </section>
+
+        <section name="Next: DirectLink">
+
+
+            <p>
+                That covers the PageLink component, at least for now. Next up: the
+                <a href="directlink.html">DirectLink Tutorial</a>
+                .
+            </p>
+        </section>
+        
+        <span class="info">
+            <sup>1</sup>
+            Session encoding is an aspect of the Servlet API. Encoding a URL adds information about
+            the server-side session (the HttpSession) if there is one. Although this information can
+            be obtained via HTTP cookies, not all users have cookies enabled in their browser. The
+            servlet specification encourages you to always encode your URLs, and this is simply done
+            for you in Tapestry. It's another example of the basic Tapestry principle:
+            <em>make the simplest choice the correct choice</em>
+            .
+        </span>
+        
+        </section>
+    </body>
 </document>

Modified: tapestry/tapestry4/trunk/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/changes.xml?rev=418868&r1=418867&r2=418868&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/changes.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/changes.xml Mon Jul  3 15:48:59 2006
@@ -21,7 +21,7 @@
     </properties>
     <body>
 
-        <release version="4.1.0" date="unreleased">
+        <release version="4.1.0" date="unreleased" desc="Ajax integrated dojo release">
             <action type="update" dev="JK">
                 Cleaned up warnings/imports showing on eclipse problem pane.
             </action>

Modified: tapestry/tapestry4/trunk/src/site/xdoc/exampleapps/index.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/exampleapps/index.xml?rev=418868&r1=418860&r2=418868&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/exampleapps/index.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/exampleapps/index.xml Mon Jul  3 15:48:59 2006
@@ -1,96 +1,140 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- 
-   Copyright 2005 The Apache Software Foundation
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
+    Copyright 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
 -->
 <document>
-<properties>
-<title>Tapestry Examples</title>
-</properties>
-<body>
-    <p> Tapestry's main distribution includes the Tapestry JAR files plus all source code for Tapestry, the Tapestry
-      documentation, and Tapestry examples. </p>
-    <p>
-<strong>Note:</strong>
-<br/> While the main source distribution does not require a 1.5 JDK, the examples do as they make use of features such
-        as annotations.</p>
-    <p> Because of licensing concerns, JAR dependencies (such as Javassist) and example applications are not distributed
-      with Tapestry itself. As an Apache Software Foundation project, the Tapestry distributions <em>must</em> be
-      limited to just software directly provided by the ASF; nothing from outside the ASF is allowed. </p>
-    <p> If you like, you can easily (?) build Tapestry, including the examples, from source. The necessary dependencies
-      are automatically downloaded by Ant build scripts, but it takes some elbow grease to set up. Details at <a href="http://wiki.apache.org/jakarta-tapestry/BuildingTapestry">the Wiki</a>. </p>
-    <p>
-      <strong>But wouldn't it be nice to just get the compiled examples, ready to take for a spin? </strong> We think
-      so, so we now provide the examples, precompiled, packaged, and ready to go, as a seperate distribution, from a 
-      non-ASF server. </p>
-    <p> These examples are available at <a href="http://howardlewisship.com/downloads/quick-start/">http://howardlewisship.com/downloads/quick-start/</a>
-        as
-        <code>tapestry-examples-</code>
-<em>version</em>
-<code>.tar.gz</code>.
-    </p>
- 
-    <p>
-      The distribution is a snapshot of a <a href="http://jboss.org/">JBoss</a> 4.0.2 instance, with two Tapestry applications
-      deployed into it.
-    </p>
+    <properties>
+        <title>Tapestry Examples</title>
+    </properties>
+    <body>
     
-    <p>
-      To make use of it, unpack the distribution, which will create
-      a <code>jboss-tapestry-examples-</code>
-<em>version</em> directory.  Change to the
-      <code>bin</code> sub-directory and execute the <code>run.bat</code> or <code>run.sh</code>
-      startup script.
-    </p>
     
-    <p>
-      JBoss will start up and you'll be able to access the two demonstration applications.
-    </p>
- 
-      
-    <section name="Workbench">
-      
-      <p>
-        <a href="http://localhost:8080/workbench/">http://localhost:8080/workbench/</a>
-      </p>
-      
-      <img src="../images/examples/workbench.png" alt="Workbench Screenshot"/>
-      
-      <p> The workbench is a testbed for many common Tapestry components. The tabs across the top demonstrate different
-        Tapestry features and components, including localization, input validation, exception reporting, and the Palette
-        and Table components. </p>
-    </section>
-    <section name="Virtual Library">
-      
-      <p>
-        <a href="http://localhost:8080/vlib/">http://localhost:8080/vlib/</a>
-      </p>
-      
-      <img src="../images/examples/vlib.png" alt="Virtual Library Screenshot"/>
-
-      
-      <p> The Virtual Library is a small but complete J2EE application. It uses J2EE Entity beans with container managed
-        persistence, and a stateless session facade, with Tapestry on the front end. The application is used to manage a
-        shared pool of books, tracking who owns and who is currently borrowing each book. </p>
-      <p> Three users are built into the library. All three use the same password, "secret":</p>
-      <ul>
-        <li>dilbert@bigco.com</li>
-        <li>squeue@bug.org</li>
-        <li>ringbearer@bagend.shire</li>
-      </ul>
-      <p> The "ringbearer" user has administrative access.  When logged in as ringbearer, you'll see
-      additional menu options for managing users and publishers. </p>
-    </section>
-  </body>
+        <section name="Tapestry Examples">
+        <p>
+            Tapestry's main distribution includes the Tapestry JAR files plus all source code for
+            Tapestry, the Tapestry documentation, and Tapestry examples.
+        </p>
+        
+        
+        <span class="info">
+            <strong>Note:</strong>
+            <br />
+            While the main source distribution does not require a 1.5 JDK, the examples do as they
+            make use of features such as annotations.
+        </span>
+        
+        <p>
+            Because of licensing concerns, JAR dependencies (such as Javassist) and example
+            applications are not distributed with Tapestry itself. As an Apache Software Foundation
+            project, the Tapestry distributions
+            <em>must</em>
+            be limited to just software directly provided by the ASF; nothing from outside the ASF
+            is allowed.
+        </p>
+        <p>
+            If you like, you can easily (?) build Tapestry, including the examples, from source. The
+            necessary dependencies are automatically downloaded by Ant build scripts, but it takes
+            some elbow grease to set up. Details at
+            <a href="http://wiki.apache.org/tapestry/BuildingTapestry">the Wiki</a>
+            .
+        </p>
+        <p>
+            <strong>
+                But wouldn't it be nice to just get the compiled examples, ready to take for a spin?
+            </strong>
+            We think so, so we now provide the examples, precompiled, packaged, and ready to go, as
+            a seperate distribution, from a non-ASF server.
+        </p>
+        <p>
+            These examples are available at
+            <a href="http://howardlewisship.com/downloads/quick-start/">
+                http://howardlewisship.com/downloads/quick-start/
+            </a>
+            as
+            <code>tapestry-examples-</code>
+            <em>version</em>
+            <code>.tar.gz</code>
+            .
+        </p>
+
+        <p>
+            The distribution is a snapshot of a
+            <a href="http://jboss.org/">JBoss</a>
+            4.0.2 instance, with two Tapestry applications deployed into it.
+        </p>
+
+        <p>
+            To make use of it, unpack the distribution, which will create a
+            <code>jboss-tapestry-examples-</code>
+            <em>version</em>
+            directory. Change to the
+            <code>bin</code>
+            sub-directory and execute the
+            <code>run.bat</code>
+            or
+            <code>run.sh</code>
+            startup script.
+        </p>
+
+        <p>JBoss will start up and you'll be able to access the two demonstration applications.</p>
+
+
+        <section name="Workbench">
+
+            <p>
+                <a href="http://localhost:8080/workbench/">http://localhost:8080/workbench/</a>
+            </p>
+
+            <img src="../images/examples/workbench.png" alt="Workbench Screenshot" />
+
+            <p>
+                The workbench is a testbed for many common Tapestry components. The tabs across the
+                top demonstrate different Tapestry features and components, including localization,
+                input validation, exception reporting, and the Palette and Table components.
+            </p>
+        </section>
+        <section name="Virtual Library">
+
+            <p>
+                <a href="http://localhost:8080/vlib/">http://localhost:8080/vlib/</a>
+            </p>
+
+            <img src="../images/examples/vlib.png" alt="Virtual Library Screenshot" />
+
+
+            <p>
+                The Virtual Library is a small but complete J2EE application. It uses J2EE Entity
+                beans with container managed persistence, and a stateless session facade, with
+                Tapestry on the front end. The application is used to manage a shared pool of books,
+                tracking who owns and who is currently borrowing each book.
+            </p>
+            <p>
+                Three users are built into the library. All three use the same password, "secret":
+            </p>
+            <ul>
+                <li>dilbert@bigco.com</li>
+                <li>squeue@bug.org</li>
+                <li>ringbearer@bagend.shire</li>
+            </ul>
+            <p>
+                The "ringbearer" user has administrative access. When logged in as ringbearer,
+                you'll see additional menu options for managing users and publishers.
+            </p>
+        </section>
+        
+        
+        </section>
+    </body>
 </document>

Modified: tapestry/tapestry4/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/index.xml?rev=418868&r1=418867&r2=418868&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/index.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/index.xml Mon Jul  3 15:48:59 2006
@@ -7,12 +7,54 @@
         <author email="jkuhnert@apache.org">Jesse Kuhnert</author>
     </properties>
     <body>
-        <section name="Upcoming Release">
+        <section name="Tapestry 4.1 - Dojo Integrated">
             <p>
                 This development series is focused around providing a full layer of support for building
-                highly dynamic web applications(XHR/ajax/dhtml) using all of the resources that modern browsers allow. 
+                highly dynamic web applications(XHR/ajax/dhtml) to enable development of rich web-based 
+                applications.
+                
+                <img style="float:right;margin-top:8px;margin-left:8px" src="./images/autocompleter.png" alt="Autocompleting select component" />
             </p>
             
+            <p><strong>New Features:</strong></p>
+            <ul>
+                <li><b>JSON -</b>  Brand new API enabling data communication 
+                                   via the <a href="http://json.org/">JSON</a>(JavaScript Object Notation) 
+                                   standard. New component classes and rendering schemes also accompany 
+                                   the API addition, allowing anyone to easily add JSON communication 
+                                   to an existing component or new components. </li>
+                <li><b>XHR -</b>  The ever popular XML communication format has also been added into the 
+                                  Tapestry core, allowing most of the common <em>ajax</em> concepts to be
+                                  easily developed in yours and existing Tapestry components.</li>
+                <li><b><a href="http://dojotoolkit.org">Dojo</a> bundled -</b> As all of the functionality 
+                                  in this release is based around the <a href="http://dojotoolkit.org">dojo</a>
+                                   javascript toolkit, we have provided it bundled with the core Tapestry jar 
+                                   files. No profile building/installation necessary. Just drop the jars in and
+                                   get at all of the client side goodies you like.</li>
+                <li><b>Widgets -</b> New <a href="http://dojotoolkit.org">dojo</a> toolkit based widget components
+                                   and complimenting foundation Component classes make it easy for anyone to create
+                                   dojo widgets and use them as Tapestry components. The initial 4.1 release won't be
+                                   as focused on providing new components as it will solid infrastructure support, but
+                                   more and more will be included as the release matures. Currently included are 
+                                   <em>Autocomplete,DropdownDatePicker,DropdownTimePicker</em>.</li>
+                <li><b>Client Side Validation -</b> The client side validation support in Tapestry has been completely
+                                    replaced with a new <a href="http://dojotoolkit.org">dojo</a> based API, providing
+                                    richer and more complete validation than has been seen in previous releases. All of the
+                                    validation constraints that can be specified on the server now have client side functional
+                                    equivalents. Default logic for displaying validation errors/interactions on the client side
+                                    UI has also been updated a great deal. The old alert box mechanism has been replaced by field
+                                    decorators that apply css rules to your form fields, as well as dhtml dialog boxes displaying
+                                    summaries of errors. Much much more is planned in this area, but the current set of functionality
+                                    should be more than enough to make many happy.</li>
+                <li><b>New Annotations -</b> Perhaps the most exciting new addition, a new <strong>@EventListener</strong>
+                                    annotation has been added. This will allow people to bind one of their page/component 
+                                    class listeners to virtually any client side widget/html event concievable. The API also supports
+                                    varying types of listening, such as being able to submit a form when a particular event happens, 
+                                    or simplying using the new <b>BrowserEvent</b> object to determine the client side state when
+                                    the event happened. <em>(Such as x/y coordinates of mouse clicks, event targets, etc..This is pretty
+                                    much a literal one-to-one mapping to real browser generated Events.)</em></li>
+            </ul>
+            
             <p>
                 Tapestry is an open-source framework for creating dynamic, robust, highly scalable
                 web applications in Java. Tapestry complements and builds upon the standard Java
@@ -20,12 +62,14 @@
             </p>
         </section>
         
-        <section name="Dojo - The JavaScript Toolkit">
+        <section name="Dojo">
             <p>
-                Most of the functionality in this series is based entirely on the wonderful <a href="http://dojotoolkit.org">Dojo</a>
-                javascript toolkit library. Not to say that you won't easily be able to plug in another toolkit if
-                you like, just that the defaults will all be based around dojo.
+                Most of the functionality in this series is based entirely on the wonderful 
+                <a href="http://dojotoolkit.org">Dojo</a> javascript toolkit library. Not to 
+                say that you won't easily be able to plug in another toolkit if you like, just 
+                that the defaults will all be based around dojo.
             </p>
         </section>
+        
     </body>
 </document>