click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r789996 - /incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml
Date Tue, 30 Jun 2009 22:46:22 GMT
Author: sabob
Date: Tue Jun 30 22:46:22 2009
New Revision: 789996

URL: http://svn.apache.org/viewvc?rev=789996&view=rev
Log:
use callouts to describe important snippets

Modified:
    incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml

Modified: incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml?rev=789996&r1=789995&r2=789996&view=diff
==============================================================================
--- incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml
(original)
+++ incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml
Tue Jun 30 22:46:22 2009
@@ -160,7 +160,7 @@
     <programlisting language="java">public class ControlListenerType1Page extends Page
{
 
     /* Set the listener to this object's "onLinkClick" method. */
-    @Bindable public ActionLink myLink = new ActionLink(this, "onLinkClick");
+    @Bindable public ActionLink myLink = new ActionLink(this, "onLinkClick"); <co id="co-bindable"
linkends="ca-bindable"/>
 
     @Bindable public String msg;
 
@@ -175,9 +175,20 @@
 
         return true;
     }
-    
+
 }</programlisting>
 
+    <calloutlist>
+      <callout arearefs="co-bindable" id="ca-bindable">
+        <para>Variables declared as <literal>@Bindable public</literal>
+        is a short-hand way of instructing Click to automatically bind request
+        parameters to Page variables. Additionally these variables will be
+        automatically added to the Page model. For more information please see the
+        section <link linkend="request-param-auto-binding">Request Parameter Auto Binding</link>.
+        </para>
+      </callout>
+    </calloutlist>
+
     <para>In the Page class we create an ActionLink called
     <varname>myLink</varname> and define the control's listener to be the page
     method <methodname>onLinkClick()</methodname>. When a user clicks on
@@ -198,15 +209,6 @@
     out on the compiler refactoring capabilities provided with modern IDEs.
     </para>
 
-    <para>If you're wondering about why the <varname>myLink</varname> and
-    <varname>msg</varname> variables are declared as <literal>@Bindable</literal>
-    <literal>public</literal>, this is a short-hand way instructing Click to
-    automatically bind request parameters to Page variables. Additionally
-    these variables will be automatically added to the Page model. For more
-    information please see the section
-    <link linkend="request-param-auto-binding">Request Parameter Auto Binding</link>.
-    </para>
-
     <para>Back to our example, in the page template we define an HTML link and
     have the <varname>myLink</varname> control render the link's href attribute:
     </para>
@@ -444,7 +446,8 @@
     // ------------------------------------- Constructor
 
     public CustomersPage() {
-        // Set Page to stateful to preserve Table sort and paging state while editing customers
+        // Setting Page to stateful to preserve Table sort and paging state while
+        // editing customers
         setStateful(true); <co id="co-stateful-table" linkends="ca-stateful-table"/>
 
         table.setClass(Table.CLASS_ITS);



Mime
View raw message