Return-Path: Delivered-To: apmail-incubator-click-commits-archive@minotaur.apache.org Received: (qmail 79636 invoked from network); 5 Feb 2009 16:40:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2009 16:40:19 -0000 Received: (qmail 96681 invoked by uid 500); 5 Feb 2009 16:40:19 -0000 Delivered-To: apmail-incubator-click-commits-archive@incubator.apache.org Received: (qmail 96669 invoked by uid 500); 5 Feb 2009 16:40:19 -0000 Mailing-List: contact click-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: click-dev@incubator.apache.org Delivered-To: mailing list click-commits@incubator.apache.org Received: (qmail 96658 invoked by uid 99); 5 Feb 2009 16:40:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 08:40:19 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 16:40:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D91B323889CF; Thu, 5 Feb 2009 16:39:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r741172 [2/2] - in /incubator/click/trunk/tools/docbook/src/docbook/click: chapter-configuration.xml chapter-controls.xml chapter-introduction.xml Date: Thu, 05 Feb 2009 16:39:47 -0000 To: click-commits@incubator.apache.org From: sabob@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090205163947.D91B323889CF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml?rev=741172&r1=741171&r2=741172&view=diff ============================================================================== --- incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml (original) +++ incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml Thu Feb 5 16:39:47 2009 @@ -2,7 +2,7 @@ Introduction to Click -
+
Preface Click is a simple JEE web application framework for commercial @@ -31,9 +31,34 @@ Possibly the best way to see how Click works is to dive right in and look at some examples. + + + + Hello World - the Hello World classic + + + Control Listener - a ActionLink control listener example + + + Simple Table - a simple Table control example + + + Advanced Table - a more advanced Table example + + + Simple Form - a simple Form example + + + Advanced Form - a more advanced Form example + +
-
+ + These examples are available online at http://www.avoka.com/click-examples/ + under the menu "Intro Examples". + +
Hello World Example A Hello World example in Click would look something like @@ -60,7 +85,7 @@ - Next we would have a page template + Next we have a page template hello-world.htm: <html> <body> @@ -72,10 +97,14 @@ </body> </html> - And finally we have a click.xml configuration - file which tells our Click application to map - hello-world.htm requests to our - HelloWorld page class. + Click is smart enough to figure out that the HelloWorld + page class maps to the template hello-world.htm. We + only have to inform Click of the package of the + HelloWorld class, in this case examples.page. + + We do that through the click.xml + configuration file which tells Click to map hello-world.htm + requests to our examples.page.HelloWorld page class. <click-app> <pages package="examples.page"/> @@ -98,7 +127,7 @@ Hello world from Click at Tue May 08 19:37:05 EST 2007
-
+
Control Listener Example Click includes a library of ControlListenerPage#12767107 object method onMyLinkClick() invoked.
-
+
Simple Table Example One of the most useful Click controls is the
-
+
Advanced Table Example The Table control also provides support for: @@ -311,11 +340,11 @@ table.addColumn(new Column("investments")); - editLink.setImageSrc("/images/window-edit.png"); + editLink.setImageSrc("/images/table-edit.png"); editLink.setTitle("Edit customer details"); editLink.setParameter("referrer", "/introduction/advanced-table.htm"); - deleteLink.setImageSrc("/images/window-delete.png"); + deleteLink.setImageSrc("/images/table-delete.png"); deleteLink.setTitle("Delete customer record"); deleteLink.setAttribute("onclick", "return window.confirm('Are you sure you want to delete this record?');"); @@ -388,7 +417,7 @@ Page deleting the customer record.
-
+
Simple Form Example @@ -499,7 +528,7 @@
-
+
Advanced Form Example The AdvancedForm page below provides a more @@ -631,7 +660,7 @@ If the user clicks on the Cancel button the request is redirected to the applications HomePage. -
+
Form Layout In the example above the Form control automatically renders the @@ -643,14 +672,14 @@ For fine grained page design you can specifically layout form and fields in your page template. See the Template Layout section and + linkend="template-layout">Template Layout section and Form Javadoc for more details. An alternative approach to page template design is using a programmatic approach. See the Programmatic Layout + linkend="programmatic-layout">Programmatic Layout section for more details.