You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2009/08/21 08:16:44 UTC
svn commit: r806427 - in
/incubator/click/trunk/click/documentation/xdocs/src/docbook/click:
chapter-configuration.xml chapter-pages.xml
Author: sabob
Date: Fri Aug 21 06:16:43 2009
New Revision: 806427
URL: http://svn.apache.org/viewvc?rev=806427&view=rev
Log:
added doc describing bindable and static resource deployment
Modified:
incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml
incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml
Modified: incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml?rev=806427&r1=806426&r2=806427&view=diff
==============================================================================
--- incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml (original)
+++ incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml Fri Aug 21 06:16:43 2009
@@ -567,6 +567,37 @@
</click-app></programlisting>
</sect3>
+ <sect3 id="application-autobinding-annotation" remap="h4">
+ <title>Page Autobinding - Using Annotations</title>
+
+ <para>By default Click's autobinding feature operates on
+ <literal>public</literal> fields. However Click also provides the
+ <ulink url="../../click-api/org/apache/click/util/Bindable.html">Bindable</ulink>
+ annotation which allows you to annotate public Page fields.
+ </para>
+
+ <para>To enable Click to recognize the <symbol>@Bindable</symbol>
+ annotation you need to set the <symbol>autobinding</symbol>
+ attribute to <varname>annotation</varname>, for example:
+ </para>
+
+ <programlisting language="xml"><![CDATA[<click-app>
+ <pages package="com.mycorp.page" ]]><symbol>autobinding</symbol>="<varname>annotation</varname>"<![CDATA[/>
+</click-app>]]></programlisting>
+
+ <para>You can now use the <symbol>@Bindable</symbol> annotation in your
+ Pages:
+ </para>
+
+ <programlisting language="java">public class EmployeePage extends Page {
+
+ <symbol>@Bindable</symbol> public Form employeeForm = new Form();
+
+ <symbol>@Bindable</symbol> public Table myTable = new Table();
+
+}</programlisting>
+
+ </sect3>
</sect2>
<sect2 id="application-headers" remap="h3">
@@ -1100,16 +1131,32 @@
</para>
<programlisting language="xml"><![CDATA[<target name="deploy" description="Deploy static resources">
<taskdef name="deploy"
- classname="org.apache.click.tools.deploy.DeployTask"
- classpath="<click-distribution>/lib/click-dev-tasks-1.1.jar"/>
+ classname="org.apache.click.tools.deploy.DeployTask"
+ classpath="<click-distribution>/lib/click-dev-tasks-1.1.jar"/>]]> <co id="co-click-distribution" linkends="ca-click-distribution"/><![CDATA[
<deploy dir="<webapp-root>/WEB-INF"
- todir="<webapp-root>"/>
+ todir="<webapp-root>"/>]]> <co id="co-webapp-root" linkends="ca-webapp-root"/><![CDATA[
</target>]]> </programlisting>
+ <calloutlist>
+ <callout arearefs="co-click-distribution" id="ca-click-distribution">
+ <para><literal><click-distribution></literal> is the location
+ where Click is installed on your machine, for example:
+ <literal>C:\software\click-2.1.0\</literal>.
+ </para>
+ </callout>
+ <callout arearefs="co-webapp-root" id="ca-webapp-root">
+ <para><literal><webapp-root></literal> is the root directory
+ of your webapp, for example: <literal>C:\dev\my-webapp\</literal>.
+ </para>
+ </callout>
+ </calloutlist>
+
<para>We use the <emphasis><deploy></emphasis> Ant Task and specify
the attributes <varname>dir</varname> and <varname>todir</varname>.
- <varname>dir</varname> specifies the <emphasis>source</emphasis>
+ </para>
+
+ <para><varname>dir</varname> specifies the <emphasis>source</emphasis>
directory to scan for JARs and folders containing static resources,
while <varname>todir</varname> specifies the <emphasis>target</emphasis>
directory where the resources should be copied to.
Modified: incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml?rev=806427&r1=806426&r2=806427&view=diff
==============================================================================
--- incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml (original)
+++ incubator/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml Fri Aug 21 06:16:43 2009
@@ -363,7 +363,7 @@
own type converter class and specify it as a ClickSerlvet init parameter.
</para>
- <para>For example if we wanted to automatically load a
+ <para>For example if you wanted to automatically load a
<classname>Customer</classname> object from the database when a customer
id request parameter is specified, you could write your own type converter:
</para>