From commitsgibbsjoseph@example.org Fri Oct 01 16:05:20 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 18684 invoked from network); 1 Oct 2010 16:05:20 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Oct 2010 16:05:20 -0000 Received: (qmail 19786 invoked by uid 500); 1 Oct 2010 16:05:20 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 19770 invoked by uid 500); 1 Oct 2010 16:05:19 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 19762 invoked by uid 99); 1 Oct 2010 16:05:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 16:05:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 16:05:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 31FCE238890B; Fri, 1 Oct 2010 16:04:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003570 - /click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml Date: Fri, 01 Oct 2010 16:04:50 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sabob Date: Fri Oct 1 16:04:49 2010 New Revision: 1003570 URL: http://svn.apache.org/viewvc?rev=1003570&view=rev Log: JSecurity is now called Apache Shiro Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml?rev=1003570&r1=1003569&r2=1003570&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml Fri Oct 1 16:04:49 2010 @@ -283,7 +283,7 @@ </listitem> <listitem> <para> - <ulink url="http://www.jsecurity.org/">JSecurity</ulink> + <ulink url="http://incubator.apache.org/shiro/">Apache Shiro</ulink> </para> </listitem> </itemizedlist> From commitsgibbsjoseph@example.org Sat Oct 02 07:15:09 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 28909 invoked from network); 2 Oct 2010 07:15:09 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Oct 2010 07:15:09 -0000 Received: (qmail 53673 invoked by uid 500); 2 Oct 2010 07:15:09 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 53656 invoked by uid 500); 2 Oct 2010 07:15:08 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 53647 invoked by uid 99); 2 Oct 2010 07:15:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 07:15:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 07:15:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 779BC23889E2; Sat, 2 Oct 2010 07:14:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003748 - in /click/trunk/click/documentation: docs/roadmap-changes.html xdocs/src/docbook/click/chapter-best-practices.xml xdocs/src/docbook/click/chapter-configuration.xml xdocs/src/docbook/click/chapter-pages.xml Date: Sat, 02 Oct 2010 07:14:41 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sabob Date: Sat Oct 2 07:14:40 2010 New Revision: 1003748 URL: http://svn.apache.org/viewvc?rev=1003748&view=rev Log: added support for absolute classnames in click.xml. CLK-704 Modified: click/trunk/click/documentation/docs/roadmap-changes.html click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml Modified: click/trunk/click/documentation/docs/roadmap-changes.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/roadmap-changes.html?rev=1003748&r1=1003747&r2=1003748&view=diff ============================================================================== --- click/trunk/click/documentation/docs/roadmap-changes.html (original) +++ click/trunk/click/documentation/docs/roadmap-changes.html Sat Oct 2 07:14:40 2010 @@ -198,6 +198,12 @@ service. [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-705">CLK-705</a>]. </li> <li class="change"> + Added support for absolute page classnames when configuring pages + in <tt>click.xml</tt>. Absolute classnames aids with IDE hot-linking + and is less confusing to use. + [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-704">CLK-704</a>]. + </li> + <li class="change"> Added a renderId property to ResourceElement to exclude the ID attribute from rendering [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-695">CLK-695</a>]. </li> Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml?rev=1003748&r1=1003747&r2=1003748&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml Sat Oct 2 07:14:40 2010 @@ -754,8 +754,8 @@ For example: </para> - <programlisting language="xml">&lt;pages package="com.mycorp.page" automapping="annotation"/&gt; - &lt;page path="click/error.htm" classname="ErrorPage"/&gt; + <programlisting language="xml">&lt;pages package="com.mycorp.page" autobinding="annotation"/&gt; + &lt;page path="click/error.htm" classname="com.mycorp.page.ErrorPage"/&gt; &lt;/pages&gt;</programlisting> <para>Generally applications handle transactional errors using service layer code Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml?rev=1003748&r1=1003747&r2=1003748&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-configuration.xml Sat Oct 2 07:14:40 2010 @@ -220,9 +220,12 @@ <programlisting language="xml">&lt;click-app charset="UTF-8" locale="de"&gt; - &lt;!-- Specify the Java package where Page classes can be found --&gt; + &lt;!-- To aid Click's automapping, specify the Java package where Page classes can be found --&gt; &lt;pages package="com.mycorp.banking.page"&gt; - &lt;page path="index.htm" classname="Home"/&gt; + &lt;!-- We have to manually define the mapping between the Home page class and index.htm template + because this page doesn't follow the automatic mapping convention of naming the page class and + template the same--&gt; + &lt;page path="index.htm" classname="com.mycorp.banking.page.Home"/&gt; &lt;/pages&gt; &lt;!-- Specify a second Java package where Page classes can be found --&gt; @@ -295,12 +298,12 @@ &lt;!ATTLIST pages <varname>automapping</varname> (true|false) "true"&gt; &lt;!ATTLIST pages <varname>autobinding</varname> (default|annotation|none) "default"&gt;</literallayout> - <para>The pages element can specify a default <varname>package</varname> name - which is prepended to the classname of any pages defined. + <para>The pages element can specify a base <varname>package</varname> + that Click should use for mapping page templates to page classes. </para> <para>The pages element also defines the <varname>automapping</varname> and - <varname>automapping</varname> attributes which is discussed in the + <varname>autobinding</varname> attributes which is discussed in the <link linkend="application-automapping">Page Automapping</link> and <link linkend="application-autobinding">Page Autobinding</link> sections respectively. @@ -374,11 +377,11 @@ </para> <para>Automapping will attempt to associate each page template (*.htm) - and JSP file in the web application (excluding those under the WEB-INF - and click directories) to a Page class. Automapped pages are loaded after - the manually defined pages are loaded, and manually defined pages takes - preference. When automapping is enabled the Click application will log - the page mappings when in debug or trace mode. + and JSP file in the web application (excluding those under WEB-INF) to a + Page class. Automapped pages are loaded after the manually defined pages + are loaded, and manually defined pages takes preference. + When automapping is enabled the page mappings will be logged if Click is + running in debug or trace mode. </para> <para>For example, given the following page path to class mapping: @@ -392,34 +395,63 @@ security/logout.htm =&gt; <tok security/change-password.htm =&gt; <token>com.mycorp.page.security.ChangePassword</token></literallayout> <para>The above mapping could be configured manually by setting the - <symbol>automapping</symbol> attribute to "false" and using the package - prefix, for example: + <symbol>automapping</symbol> attribute to <literal>false</literal>, + for example: </para> <programlisting language="xml">&lt;click-app&gt; - &lt;pages package="<token>com.mycorp.page</token>" <symbol>automapping</symbol>="false"&gt; - &lt;page path="index.htm" classname="<token>Home</token>"/&gt; - &lt;page path="search.htm" classname="<token>Search</token>"/&gt; - &lt;page path="contacts/contacts.htm" classname="<token>contacts.Contacts</token>"/&gt; - &lt;page path="security/login.htm" classname="<token>security.Login</token>"/&gt; - &lt;page path="security/logout.htm" classname="<token>security.Logout</token>"/&gt; - &lt;page path="security/change-password.htm" classname="<token>security.ChangePassword</token>"/&gt; + &lt;pages automapping="false"&gt; + &lt;page path="index.htm" classname="<token>com.mycorp.page.Home</token>"/&gt; + &lt;page path="search.htm" classname="<token>com.mycorp.page.Search</token>"/&gt; + &lt;page path="contacts/contacts.htm" classname="<token>com.mycorp.page.contacts.Contacts</token>"/&gt; + &lt;page path="security/login.htm" classname="<token>com.mycorp.page.security.Login</token>"/&gt; + &lt;page path="security/logout.htm" classname="<token>com.mycorp.page.security.Logout</token>"/&gt; + &lt;page path="security/change-password.htm" classname="<token>com.mycorp.page.security.ChangePassword</token>"/&gt; &lt;/pages&gt; &lt;/click-app&gt;</programlisting> - <para>By using <symbol>automapping</symbol> the page paths will automatically - map to page classes: (except for Home page which doesn't automatically map - to index.html) + <para>For an application with many pages, it is cumbersome to manually map + each page template to its associated class. This is where + <symbol>automapping</symbol> comes in. + </para> + + <para>By setting <symbol>automapping</symbol> to <literal>true</literal>, + Click will automatically map page templates to page classes. To map a + template to a page class, Click converts the template path to the Page + classname. In the example above, Click will convert the template + <token>search.htm</token> to the class <token>Search</token> by + capitilizing the template name and removing the <literal>.htm</literal> + extension. Of course this is not enough to map the template to the class. + what is missing is the class package, <token>com.mycorp.page</token>. + To help Click map the page, you can set the base <literal>package</literal> + attribute as shown in the next example. + </para> + + <para>Below is the full configuration to automatically map the templates + to pages (except for index.htm which doesn't automatically map to Home + page and has to be mapped manually): </para> <programlisting language="xml">&lt;click-app&gt; &lt;pages package="<token>com.mycorp.page</token>" <symbol>automapping</symbol>="true"&gt; - &lt;page path="index.htm" classname="Home"/&gt; + &lt;page path="index.htm" classname="com.mycorp.page.Home"/&gt; &lt;/pages&gt; &lt;/click-app&gt;</programlisting> - <para>Note <symbol>automapping</symbol> is true by default, so it could be - omitted from the configuration file. + <para>Note: <symbol>automapping</symbol> is <literal>true</literal> by + default, so it could be omitted. + </para> + + <para>If a page template is placed in a <literal>sub folder</literal> + of the root web folder, it's associated page class must be placed in an + equivalently named <literal>sub package</literal> of the base package in + order for the page to be mapped automatically. In the mapping above the + page template <token>security/change-password.htm</token> is located in + the <token>security</token> folder under the web root. In order for Click + to correctly map the page template to it's class, the class must be + located in the <token>security</token> package of the + base package <token>com.mycorp.page</token>. The absolute page classname + is thus: <token>com.mycorp.page.security.ChangePassword</token>. </para> <para>The page template name to classname convention is: @@ -430,9 +462,9 @@ change_password.htm =&gt; <token>Chang changePassword.htm =&gt; <token>ChangePassword</token> ChangePassword.htm =&gt; <token>ChangePassword</token></literallayout> - <para>When automapping pages, if a class cannot be found Click will attempt - to add the 'Page' suffix to the classname if not already present and map - this. For example: + <para>During automapping, if a page class cannot be found, Click will + add the 'Page' suffix to the classname (if not already present) and + attempt to map the page template to this modified classname. For example: </para> <literallayout>customer.htm =&gt; <token>CustomerPage</token> @@ -721,25 +753,28 @@ change-password.htm =&gt; <token>Chang &lt;/click-app&gt;</programlisting> <para>Alternatively you can define your headers individually in pages or - for all application pages by setting header values. For example to switch - off caching in the login page, note the value for a Date type should - be a long number value: + for all application pages by setting header values. For example, to + switch off caching in the <literal>Login</literal> page, set the + following page cache control headers: </para> <programlisting language="xml">&lt;pages package="com.mycorp.page"&gt; - &lt;page path="login.htm" classname="Login"&gt; + &lt;page path="login.htm" classname="com.mycorp.page.Login"&gt; &lt;header name="Pragma" value="no-cache"/&gt; &lt;header name="Expires" value="1" type="Date"/&gt; &lt;/page&gt; &lt;/pages&gt;</programlisting> + <para>Note: the value for a Date type should be a long number value. + </para> + <para>If you wanted to enable caching for a particular page you could set the following page cache control header. This will mark the page as cachable for a period of 1 hour after which it should be reloaded. </para> <programlisting language="xml">&lt;pages package="com.mycorp.page"&gt; - &lt;page path="home.htm" classname="Home"&gt; + &lt;page path="home.htm" classname="com.mycorp.page.Home"&gt; &lt;header name="Cache-Control" value="max-age=3600, public, must-revalidate"/&gt; &lt;/page&gt; &lt;/pages&gt;</programlisting> Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml?rev=1003748&r1=1003747&r2=1003748&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml Sat Oct 2 07:14:40 2010 @@ -867,7 +867,9 @@ public void onPost() { method, returning the path of the border template to render. For example: </para> - <programlisting language="java">public class BorderedPage extends Page { + <programlisting language="java">package com.mycorp.page; + +public class BorderedPage extends Page { /** * @see Page#getTemplate() @@ -906,9 +908,11 @@ public void onPost() { <para>An example bordered Home page is provided below: </para> - <literallayout>&lt;page path="<varname>home.htm</varname>" classname="<token>Home</token>"/&gt;</literallayout> + <literallayout>&lt;page path="<varname>home.htm</varname>" classname="<token>com.mycorp.page.Home</token>"/&gt;</literallayout> + + <programlisting language="java">package com.mycorp.page; - <programlisting language="java">public class Home extends BorderedPage { +public class Home extends BorderedPage { public String title = "Home"; From commitsgibbsjoseph@example.org Sun Oct 10 11:17:19 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 90102 invoked from network); 10 Oct 2010 11:17:19 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 10 Oct 2010 11:17:19 -0000 Received: (qmail 8836 invoked by uid 500); 10 Oct 2010 11:17:19 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 8820 invoked by uid 500); 10 Oct 2010 11:17:18 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 8784 invoked by uid 99); 10 Oct 2010 11:17:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Oct 2010 11:17:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Oct 2010 11:17:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5B44B23889EA; Sun, 10 Oct 2010 11:16:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1006271 - /click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java Date: Sun, 10 Oct 2010 11:16:56 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Sun Oct 10 11:16:56 2010 New Revision: 1006271 URL: http://svn.apache.org/viewvc?rev=1006271&view=rev Log: remove unused imports Modified: click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java Modified: click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java?rev=1006271&r1=1006270&r2=1006271&view=diff ============================================================================== --- click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java (original) +++ click/trunk/click/extras/src/org/apache/click/extras/control/FormTable.java Sun Oct 10 11:16:56 2010 @@ -19,7 +19,6 @@ package org.apache.click.extras.control; import java.util.List; -import org.apache.click.Context; import org.apache.click.control.Button; import org.apache.click.control.Column; @@ -33,7 +32,6 @@ import org.apache.click.util.HtmlStringB import org.apache.click.control.ActionLink; import org.apache.click.dataprovider.PagingDataProvider; import org.apache.commons.lang.StringUtils; -import org.springframework.util.NumberUtils; /** * Provides a FormTable data grid control. From commitsgibbsjoseph@example.org Tue Oct 12 11:05:15 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 82049 invoked from network); 12 Oct 2010 11:05:15 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 12 Oct 2010 11:05:15 -0000 Received: (qmail 98970 invoked by uid 500); 12 Oct 2010 11:05:15 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 98946 invoked by uid 500); 12 Oct 2010 11:05:14 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 98937 invoked by uid 99); 12 Oct 2010 11:05:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 11:05:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 11:05:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E20FE23889BF; Tue, 12 Oct 2010 11:04:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1021740 - /click/trunk/click/framework/src/org/apache/click/ClickServlet.java Date: Tue, 12 Oct 2010 11:04:49 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sabob Date: Tue Oct 12 11:04:49 2010 New Revision: 1021740 URL: http://svn.apache.org/viewvc?rev=1021740&view=rev Log: lookup ThreadLocal Context only once inside method Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ClickServlet.java?rev=1021740&r1=1021739&r2=1021740&view=diff ============================================================================== --- click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original) +++ click/trunk/click/framework/src/org/apache/click/ClickServlet.java Tue Oct 12 11:04:49 2010 @@ -1125,11 +1125,12 @@ public class ClickServlet extends HttpSe */ @SuppressWarnings("deprecation") protected void processPageOnDestroy(Page page, long startTime) { + Context context = page.getContext(); if (page.hasControls()) { // notify callbacks of destroy event // TODO check that exceptions don't unnecessarily trigger preDestroy - ControlRegistry.getThreadLocalRegistry().processPreDestroy(page.getContext()); + ControlRegistry.getThreadLocalRegistry().processPreDestroy(context); List<Control> controls = page.getControls(); @@ -1154,7 +1155,7 @@ public class ClickServlet extends HttpSe // Reset the page navigation state try { // Reset the path - String path = page.getContext().getResourcePath(); + String path = context.getResourcePath(); page.setPath(path); // Reset the forward @@ -1175,9 +1176,9 @@ public class ClickServlet extends HttpSe page.onDestroy(); if (page.isStateful()) { - page.getContext().setSessionAttribute(page.getClass().getName(), page); + context.setSessionAttribute(page.getClass().getName(), page); } else { - page.getContext().removeSessionAttribute(page.getClass().getName()); + context.removeSessionAttribute(page.getClass().getName()); } if (logger.isTraceEnabled()) { From commitsgibbsjoseph@example.org Tue Oct 12 11:14:22 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 83970 invoked from network); 12 Oct 2010 11:14:22 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 12 Oct 2010 11:14:22 -0000 Received: (qmail 11506 invoked by uid 500); 12 Oct 2010 11:14:21 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 11489 invoked by uid 500); 12 Oct 2010 11:14:21 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 11481 invoked by uid 99); 12 Oct 2010 11:14:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 11:14:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 11:14:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6347523889BF; Tue, 12 Oct 2010 11:13:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1021742 - /click/trunk/click/framework/src/org/apache/click/ClickServlet.java Date: Tue, 12 Oct 2010 11:13:59 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Tue Oct 12 11:13:59 2010 New Revision: 1021742 URL: http://svn.apache.org/viewvc?rev=1021742&view=rev Log: Hudson test.Please ignore Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ClickServlet.java?rev=1021742&r1=1021741&r2=1021742&view=diff ============================================================================== --- click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original) +++ click/trunk/click/framework/src/org/apache/click/ClickServlet.java Tue Oct 12 11:13:59 2010 @@ -1067,7 +1067,7 @@ public class ClickServlet extends HttpSe // Log request parameters if (logger.isTraceEnabled()) { logger.trace(" is Ajax request: " + context.isAjaxRequest()); - logRequestParameters(request); + logRequestParameters(request) } String path = context.getResourcePath(); From commitsgibbsjoseph@example.org Tue Oct 12 11:19:31 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 84845 invoked from network); 12 Oct 2010 11:19:31 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 12 Oct 2010 11:19:31 -0000 Received: (qmail 16491 invoked by uid 500); 12 Oct 2010 11:19:31 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 16472 invoked by uid 500); 12 Oct 2010 11:19:30 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 16464 invoked by uid 99); 12 Oct 2010 11:19:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 11:19:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 11:19:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D872423889BF; Tue, 12 Oct 2010 11:19:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1021743 - /click/trunk/click/framework/src/org/apache/click/ClickServlet.java Date: Tue, 12 Oct 2010 11:19:09 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Tue Oct 12 11:19:09 2010 New Revision: 1021743 URL: http://svn.apache.org/viewvc?rev=1021743&view=rev Log: Hudson test.fix build Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ClickServlet.java?rev=1021743&r1=1021742&r2=1021743&view=diff ============================================================================== --- click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original) +++ click/trunk/click/framework/src/org/apache/click/ClickServlet.java Tue Oct 12 11:19:09 2010 @@ -1067,7 +1067,7 @@ public class ClickServlet extends HttpSe // Log request parameters if (logger.isTraceEnabled()) { logger.trace(" is Ajax request: " + context.isAjaxRequest()); - logRequestParameters(request) + logRequestParameters(request); } String path = context.getResourcePath(); From commitsgibbsjoseph@example.org Wed Oct 13 08:53:42 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 49803 invoked from network); 13 Oct 2010 08:53:42 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 13 Oct 2010 08:53:42 -0000 Received: (qmail 65735 invoked by uid 500); 13 Oct 2010 08:53:42 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 65716 invoked by uid 500); 13 Oct 2010 08:53:41 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 65707 invoked by uid 99); 13 Oct 2010 08:53:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 08:53:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 08:53:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 631A523889BB; Wed, 13 Oct 2010 08:52:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1022032 - in /click/trunk/click/documentation: docs/ xdocs/src/docbook/click/ Date: Wed, 13 Oct 2010 08:52:43 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Wed Oct 13 08:52:42 2010 New Revision: 1022032 URL: http://svn.apache.org/viewvc?rev=1022032&view=rev Log: updated click examples link Modified: click/trunk/click/documentation/docs/click-online.html click/trunk/click/documentation/docs/click.html click/trunk/click/documentation/docs/examples.html click/trunk/click/documentation/docs/faq.html click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml Modified: click/trunk/click/documentation/docs/click-online.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/click-online.html?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/docs/click-online.html (original) +++ click/trunk/click/documentation/docs/click-online.html Wed Oct 13 08:52:42 2010 @@ -76,7 +76,7 @@ <p>Click downloads</p> </td> <td> - <a class="external" target="_blank" href="http://www.avoka.com/click-examples/">Click Examples</a> + <a class="external" target="_blank" href="http://click.avoka.com/click-examples/">Click Examples</a> <p>Click Examples application</p> </td> </tr><tr> Modified: click/trunk/click/documentation/docs/click.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/click.html?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/docs/click.html (original) +++ click/trunk/click/documentation/docs/click.html Wed Oct 13 08:52:42 2010 @@ -86,7 +86,7 @@ and use, with developers getting up and </ul> <div class="action-container"> - <a target="_blank" href="http://www.avoka.com/click-examples/"> + <a target="_blank" href="http://click.avoka.com/click-examples/"> <div class="action">Examples</div> </a> <a target="topic" href="downloads.html"> Modified: click/trunk/click/documentation/docs/examples.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/examples.html?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/docs/examples.html (original) +++ click/trunk/click/documentation/docs/examples.html Wed Oct 13 08:52:42 2010 @@ -40,7 +40,7 @@ This application will allows you to view config files online. <p/> You can view this application online at -<a target="_blank" class="external" href="http://www.avoka.com/click-examples/">http://www.avoka.com/click-examples/</a> +<a target="_blank" class="external" href="http://click.avoka.com/click-examples/">http://click.avoka.com/click-examples/</a> <a name="deploying" class="heading"></a><h3>Deploying Examples</h3> Modified: click/trunk/click/documentation/docs/faq.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/faq.html?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/docs/faq.html (original) +++ click/trunk/click/documentation/docs/faq.html Wed Oct 13 08:52:42 2010 @@ -125,7 +125,7 @@ <dd> If you want commercial support or training for Click, you can obtain this from - <a target="_blank" href="http://www.avoka.com">Avoka Technologies</a>. + <a target="_blank" href="http://click.avoka.com">Avoka Technologies</a>. <p/> For more details please email <a href="mailto:gibbsjoseph@example.org">Malcolm Edgar</a>. </dd> Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-best-practices.xml Wed Oct 13 08:52:42 2010 @@ -944,7 +944,7 @@ public class ErrorPage extends org.apach &lt;/html&gt;</programlisting> <para>A live demo is available - <ulink url="http://www.avoka.com/click-examples/general/page-imports-example.htm">here</ulink> + <ulink url="http://click.avoka.com/click-examples/general/page-imports-example.htm">here</ulink> </para> </sect1> Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml Wed Oct 13 08:52:42 2010 @@ -561,7 +561,7 @@ production-error-message= &lt;/html&gt; </programlisting> <para>A live demo showing how to add HEAD elements from a custom Control can - be seen <ulink url="http://www.avoka.com/click-examples/general/control-head-demo.htm">here</ulink>. + be seen <ulink url="http://click.avoka.com/click-examples/general/control-head-demo.htm">here</ulink>. </para> </sect1> @@ -1060,7 +1060,7 @@ public class EmployeePage extends Page { transformed into a fancy looking form. </para> - <para>There is a <ulink url="http://www.avoka.com/click-examples/form/contact-details.htm">live demo</ulink> + <para>There is a <ulink url="http://click.avoka.com/click-examples/form/contact-details.htm">live demo</ulink> showing the programmatic approach. </para> Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-introduction.xml Wed Oct 13 08:52:42 2010 @@ -51,7 +51,7 @@ <para>Possibly the best way to see how Click works is to dive right in and look at some examples. (The examples are also available online at - <ulink url="http://www.avoka.com/click-examples/">http://www.avoka.com/click-examples/</ulink> + <ulink url="http://click.avoka.com/click-examples/">http://click.avoka.com/click-examples/</ulink> under the menu "Intro Examples".) </para> @@ -839,7 +839,7 @@ public HelloWorld extends Page { and the fields HTML markup. This is a great feature for quickly building screens, and the form control provides a number of layout options. See the Click Examples for an interactive - <ulink url="http://www.avoka.com/click-examples/form/form-properties.htm">Form Properties demo</ulink>. + <ulink url="http://click.avoka.com/click-examples/form/form-properties.htm">Form Properties demo</ulink>. </para> <para>For fine grained page design you can specifically layout form and Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml?rev=1022032&r1=1022031&r2=1022032&view=diff ============================================================================== --- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml (original) +++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml Wed Oct 13 08:52:42 2010 @@ -1057,7 +1057,7 @@ public <token>ActionResult</token> <symb the client you have to do that from the <methodname>onSecurityCheck()</methodname> event, since other Page events are not executed. Please see - <ulink url="http://www.avoka.com/click-examples/ajax/ajax-secure.htm">this</ulink> + <ulink url="http://click.avoka.com/click-examples/ajax/ajax-secure.htm">this</ulink> example for some strategies on implementing <methodname>onSecurityCheck</methodname> to handle ajax requests. </para> @@ -1613,7 +1613,7 @@ public class SearchPage extends Page imp &lt;/html&gt; </programlisting> <para>A live demo showing how to add HEAD elements to a Page can be seen - <ulink url="http://www.avoka.com/click-examples/general/page-head-demo.htm">here</ulink>. + <ulink url="http://click.avoka.com/click-examples/general/page-head-demo.htm">here</ulink>. </para> </sect1> From commitsgibbsjoseph@example.org Wed Oct 13 08:58:52 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 50429 invoked from network); 13 Oct 2010 08:58:52 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 13 Oct 2010 08:58:52 -0000 Received: (qmail 71594 invoked by uid 500); 13 Oct 2010 08:58:52 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 71576 invoked by uid 500); 13 Oct 2010 08:58:51 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 71568 invoked by uid 99); 13 Oct 2010 08:58:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 08:58:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 08:58:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 99D5923889BB; Wed, 13 Oct 2010 08:57:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1022034 - in /click/trunk/click/extras/src/org/apache/click/extras/control: HtmlFieldSet.java HtmlForm.java Date: Wed, 13 Oct 2010 08:57:51 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sabob Date: Wed Oct 13 08:57:51 2010 New Revision: 1022034 URL: http://svn.apache.org/viewvc?rev=1022034&view=rev Log: updated click examples link Modified: click/trunk/click/extras/src/org/apache/click/extras/control/HtmlFieldSet.java click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java Modified: click/trunk/click/extras/src/org/apache/click/extras/control/HtmlFieldSet.java URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/HtmlFieldSet.java?rev=1022034&r1=1022033&r2=1022034&view=diff ============================================================================== --- click/trunk/click/extras/src/org/apache/click/extras/control/HtmlFieldSet.java (original) +++ click/trunk/click/extras/src/org/apache/click/extras/control/HtmlFieldSet.java Wed Oct 13 08:57:51 2010 @@ -36,7 +36,7 @@ import org.apache.click.util.HtmlStringB * You can read more about programmatic layout * <a href="../../../../../../user-guide/html/ch03s07.html#programmatic-layout">here</a>. * <p/> - * Also see this <a href="http://www.avoka.com/click-examples/form/contact-details.htm">example</a> + * Also see this <a href="http://click.avoka.com/click-examples/form/contact-details.htm">example</a> * of how HtmlFieldSet is used to provide a custom layout. */ public class HtmlFieldSet extends FieldSet { Modified: click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java?rev=1022034&r1=1022033&r2=1022034&view=diff ============================================================================== --- click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java (original) +++ click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java Wed Oct 13 08:57:51 2010 @@ -38,7 +38,7 @@ import org.apache.click.util.HtmlStringB * You can read more about programmatic layout * <a href="../../../../../../user-guide/html/ch03s07.html#programmatic-layout">here</a>. * <p/> - * Also see this <a href="http://www.avoka.com/click-examples/form/contact-details.htm">example</a> + * Also see this <a href="http://click.avoka.com/click-examples/form/contact-details.htm">example</a> * of how HtmlForm is used to provide a custom layout. * <p/> * <b>Please note</b>, for most cases {@link Form} is the better option as From commitsgibbsjoseph@example.org Wed Oct 13 09:02:10 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 51373 invoked from network); 13 Oct 2010 09:02:10 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 13 Oct 2010 09:02:10 -0000 Received: (qmail 76741 invoked by uid 500); 13 Oct 2010 09:02:09 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 76726 invoked by uid 500); 13 Oct 2010 09:02:09 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 76718 invoked by uid 99); 13 Oct 2010 09:02:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 09:02:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 09:02:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A98632388A1C; Wed, 13 Oct 2010 09:01:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1022035 - /click/trunk/click/documentation/docs/roadmap-changes.html Date: Wed, 13 Oct 2010 09:01:07 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sabob Date: Wed Oct 13 09:01:07 2010 New Revision: 1022035 URL: http://svn.apache.org/viewvc?rev=1022035&view=rev Log: updated click examples link Modified: click/trunk/click/documentation/docs/roadmap-changes.html Modified: click/trunk/click/documentation/docs/roadmap-changes.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/roadmap-changes.html?rev=1022035&r1=1022034&r2=1022035&view=diff ============================================================================== --- click/trunk/click/documentation/docs/roadmap-changes.html (original) +++ click/trunk/click/documentation/docs/roadmap-changes.html Wed Oct 13 09:01:07 2010 @@ -118,7 +118,7 @@ service. </div> <ul style="padding: 0em; margin-left:0em;margin-bottom: 2em"> <li class="change"> - Added <a target="_blank" class="external" href="http://www.avoka.com/click-examples/">examples</a> + Added <a target="_blank" class="external" href="http://click.avoka.com/click-examples/">examples</a> showcasing the new Ajax support. See the Ajax Menu for the full list of examples. </li> @@ -321,19 +321,19 @@ Select.setAttribute("onchange", "Click.s </div> <ul style="padding: 0em; margin-left:0em;margin-bottom: 2em"> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/form/dynamic/dynamic-form.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/form/dynamic/dynamic-form.htm"> Dynamic Form</a> demonstrates how to dynamically add new gibbsjoseph@example.org. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/form/dynamic/dynamic-field-set.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/form/dynamic/dynamic-field-set.htm"> Dynamic FieldSet</a> demonstrates how to dynamically add a gibbsjoseph@example.org. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/form/dynamic/dynamic-select.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/form/dynamic/dynamic-select.htm"> Dynamic Select</a> demonstrates how to dynamically add fields based on a Select field value. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/control/disabled-demo.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/control/disabled-demo.htm"> Disabled Demo</a> demonstrates the behavior of disabled fields. </li> </ul> @@ -585,7 +585,7 @@ Select.setAttribute("onchange", "Click.s </div> <ul style="padding: 0em; margin-left:0em;margin-bottom: 2em"> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/general/page-head-demo.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/general/page-head-demo.htm"> Page HEAD elements</a> demonstrates how to add <a href="click-api/org/apache/click/element/JsImport.html">JsImport</a>, <a href="click-api/org/apache/click/element/JsScript.html">JsScript</a>, @@ -594,33 +594,33 @@ Select.setAttribute("onchange", "Click.s HEAD elements to a Page. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/general/control-head-demo.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/general/control-head-demo.htm"> Control HEAD elements</a> demonstrates how to add <a href="click-api/org/apache/click/element/JsImport.html">JsImport</a> and <a href="click-api/org/apache/click/element/CssImport.html">CssImport</a> HEAD elements to a custom Control. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/control/submit-link-demo.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/control/submit-link-demo.htm"> SubmitLink Demo</a> shows how to use the new <a href="extras-api/org/apache/click/extras/control/SubmitLink.html">SubmitLink</a> control. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/table/large-dataset-demo.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/table/large-dataset-demo.htm"> Large Dataset</a> is an example of a Table with a large number of rows and how to lazily page through the rows using a custom data provider. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/panel/reusable-panel-demo.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/panel/reusable-panel-demo.htm"> Reusable Panel</a> is an example of a reusable Panel which provides a Form for capturing Client details. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/quartz/quartz-job-scheduler.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/quartz/quartz-job-scheduler.htm"> Quartz Job Scheduler</a> is an example demonstrating how to integrate the Quartz Job Scheduling framework into a Click application. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/general/excel-table-export.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/general/excel-table-export.htm"> Excel Table Exporter</a> example demonstrates how to export a Click Table to an Excel spreadsheet using <a class="external" target="_blank" href="http://poi.apache.org/">Apache POI</a>. @@ -1132,24 +1132,24 @@ Select.setAttribute("onchange", "Click.s </div> <ul style="padding: 0em; margin-left:0em;margin-bottom: 2em"> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/wizard/wizard.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/wizard/wizard.htm"> Wizard demo</a> shows how to leverage a <a href="user-guide/html/ch02s09.html">stateful</a> page and <a href="click-api/org/apache/click/control/Panel.html">Panels</a> to create a process flow. Each Step in the process is represented by a Panel which is managed by the stateful Page. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/control/populate-on-select.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/control/populate-on-select.htm"> Populate on select</a> shows how items in one combo box is populated based on the selected item in another using JavaScript. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/table/edit-form-table.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/table/edit-form-table.htm"> FormTable demo</a> shows how a FormTable can be used together with an existing Form. </li> <li> - <a target="_blank" class="external" href="http://www.avoka.com/click-examples/tree/page-link-tree-page.htm"> + <a target="_blank" class="external" href="http://click.avoka.com/click-examples/tree/page-link-tree-page.htm"> Page link tree</a> provides a demonstration of using the Tree component to link to different pages. </li> @@ -1337,7 +1337,7 @@ Select.setAttribute("onchange", "Click.s This includes removing BasicForm which was included in 1.5-M1 and adding new Controls <a href="extras-api/org/apache/click/extras/control/HtmlForm.html">HtmlForm</a> and <a href="extras-api/org/apache/click/extras/control/HtmlFieldSet.html">HtmlFieldSet</a>. - You can find an example of HtmlForm in action <a target="_blank" href="http://www.avoka.com/click-examples/form/contact-details.htm">here</a>. + You can find an example of HtmlForm in action <a target="_blank" href="http://click.avoka.com/click-examples/form/contact-details.htm">here</a>. </li> <li class="change"> Added support for multiple page package definitions in click.xml configuration. @@ -1349,7 +1349,7 @@ Select.setAttribute("onchange", "Click.s <li class="change"> Added configurable table <a href="click-api/org/apache/click/control/TablePaginator.html">Paginator</a> support and an <a href="extras-api/org/apache/click/extras/control/TableInlinePaginator.html">InlinePaginator</a>. - A new <a target="_blank" href="http://www.avoka.com/click-examples/table/table-paginator.htm">example</a> + A new <a target="_blank" href="http://click.avoka.com/click-examples/table/table-paginator.htm">example</a> shows the different Paginator options available. This issue was raised by Gustav Weber [<a target='_blank' href="https://issues.apache.org/jira/browse/CLK-390">390</a>]. </li> @@ -1574,25 +1574,25 @@ public class MyPage extends Page { <li class="change">New examples: <ul style="padding-top: 5px;"> <li> - <a target="_blank" href="http://www.avoka.com/click-examples/form/extra-controls-form.htm">Country Select field</a> + <a target="_blank" href="http://click.avoka.com/click-examples/form/extra-controls-form.htm">Country Select field</a> </li> <li> - <a target="_blank" href="http://www.avoka.com/click-examples/form/contact-details.htm">Custom Form Layout using Containers</a> + <a target="_blank" href="http://click.avoka.com/click-examples/form/contact-details.htm">Custom Form Layout using Containers</a> </li> <li> - <a target="_blank" href="http://www.avoka.com/click-examples/form/extra-controls-form.htm">Virtual Keyboard field</a> + <a target="_blank" href="http://click.avoka.com/click-examples/form/extra-controls-form.htm">Virtual Keyboard field</a> </li> <li> - <a target="_blank" href="http://www.avoka.com/click-examples/general/excel-export.htm">Excel Export Demo</a> + <a target="_blank" href="http://click.avoka.com/click-examples/general/excel-export.htm">Excel Export Demo</a> </li> <li> - <a target="_blank" href="http://www.avoka.com/click-examples/jsp/edit-customer.htm">JSP - Edit Customer</a> + <a target="_blank" href="http://click.avoka.com/click-examples/jsp/edit-customer.htm">JSP - Edit Customer</a> </li> <li> - <a target="_blank" href="http://www.avoka.com/click-examples/jsp/navigation-a.htm">JSP - Navigation</a> + <a target="_blank" href="http://click.avoka.com/click-examples/jsp/navigation-a.htm">JSP - Navigation</a> </li> <li> - <a target="_blank" href="http://www.avoka.com/click-examples/jsp/multi-path-demo.htm">JSP - Multi Path Demo</a> + <a target="_blank" href="http://click.avoka.com/click-examples/jsp/multi-path-demo.htm">JSP - Multi Path Demo</a> </li> </ul> </li> From commitsgibbsjoseph@example.org Fri Oct 15 10:54:14 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 81089 invoked from network); 15 Oct 2010 10:54:14 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 15 Oct 2010 10:54:14 -0000 Received: (qmail 98087 invoked by uid 500); 15 Oct 2010 10:54:14 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 97893 invoked by uid 500); 15 Oct 2010 10:54:13 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 97826 invoked by uid 99); 15 Oct 2010 10:54:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 10:54:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 10:54:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E51E023889FD; Fri, 15 Oct 2010 10:53:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1022881 - /click/trunk/click/documentation/docs/roadmap-changes.html Date: Fri, 15 Oct 2010 10:53:15 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Fri Oct 15 10:53:15 2010 New Revision: 1022881 URL: http://svn.apache.org/viewvc?rev=1022881&view=rev Log: roadmap Modified: click/trunk/click/documentation/docs/roadmap-changes.html Modified: click/trunk/click/documentation/docs/roadmap-changes.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/roadmap-changes.html?rev=1022881&r1=1022880&r2=1022881&view=diff ============================================================================== --- click/trunk/click/documentation/docs/roadmap-changes.html (original) +++ click/trunk/click/documentation/docs/roadmap-changes.html Fri Oct 15 10:53:15 2010 @@ -68,8 +68,8 @@ <h2>Road Map</h2> New Click releases will be released every quarter with the next version Click 2.3.0 scheduled for the end of October 2010. Tentative features for the next release -includes improved Ajax support, Page Action support and a Java based configuration -service. +includes improved Ajax support, Page Action support, light-weight stateful controls +to replace stateful pages and a Java based configuration service. <p>&nbsp;</p> From commitsgibbsjoseph@example.org Sat Oct 16 09:07:30 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 7062 invoked from network); 16 Oct 2010 09:07:30 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 16 Oct 2010 09:07:30 -0000 Received: (qmail 45203 invoked by uid 500); 16 Oct 2010 09:07:30 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 45189 invoked by uid 500); 16 Oct 2010 09:07:29 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 45180 invoked by uid 99); 16 Oct 2010 09:07:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Oct 2010 09:07:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Oct 2010 09:07:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 673722388A1C; Sat, 16 Oct 2010 09:06:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1023221 - /click/trunk/click/documentation/docs/click.html Date: Sat, 16 Oct 2010 09:06:32 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Sat Oct 16 09:06:32 2010 New Revision: 1023221 URL: http://svn.apache.org/viewvc?rev=1023221&view=rev Log: homepage update Modified: click/trunk/click/documentation/docs/click.html Modified: click/trunk/click/documentation/docs/click.html URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/click.html?rev=1023221&r1=1023220&r2=1023221&view=diff ============================================================================== --- click/trunk/click/documentation/docs/click.html (original) +++ click/trunk/click/documentation/docs/click.html Sat Oct 16 09:06:32 2010 @@ -78,7 +78,8 @@ and use, with developers getting up and <li class="item">Very easy to learn</li> <li class="item">Component and Page Oriented design</li> <li class="item">Event base programming model</li> - <li class="item">Stateless and stateful page support</li> + <li class="item">Stateless (with support for light-weight stateful components)</li> + <li class="item">Server-side Ajax support</li> <li class="item">Exceptional performance</li> <li class="item">Automatic form rendering and client/server side validation</li> <li class="item">Supports Velocity, JSP or FreeMarker page rendering</li> From commitsgibbsjoseph@example.org Sun Oct 17 04:12:30 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 97869 invoked from network); 17 Oct 2010 04:12:30 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 17 Oct 2010 04:12:30 -0000 Received: (qmail 92785 invoked by uid 500); 17 Oct 2010 04:12:30 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 92766 invoked by uid 500); 17 Oct 2010 04:12:29 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 92758 invoked by uid 99); 17 Oct 2010 04:12:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 04:12:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 04:12:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9A96323889F7; Sun, 17 Oct 2010 04:11:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1023422 - in /click/trunk/click/framework/src/org/apache/click: Stateful.java util/ClickUtils.java Date: Sun, 17 Oct 2010 04:11:27 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sabob Date: Sun Oct 17 04:11:26 2010 New Revision: 1023422 URL: http://svn.apache.org/viewvc?rev=1023422&view=rev Log: added Stateful interface and helper methods. CLK-715 Added: click/trunk/click/framework/src/org/apache/click/Stateful.java Modified: click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Added: click/trunk/click/framework/src/org/apache/click/Stateful.java URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/Stateful.java?rev=1023422&view=auto ============================================================================== --- click/trunk/click/framework/src/org/apache/click/Stateful.java (added) +++ click/trunk/click/framework/src/org/apache/click/Stateful.java Sun Oct 17 04:11:26 2010 @@ -0,0 +1,142 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +package org.apache.click; + +/** + * Provides an interface that controls can implement that need to preserve + * state across multiple requests. + * <p/> + * <b>Please note:</b> Control state is not saved and restored automatically by + * Click. Instead, state saving and restoring is under full control of the + * developer through a public API. + * <p/> + * Controls implementing this interface are expected to {@link #getState() save} + * and {@link #setState(java.lang.Object) restore} their internal state, as well + * as the state of their child controls. Controls can further expose a public + * API for saving and restoring their state. + * <p/> + * An example implementation is shown below: + * + * <pre class="prettyprint"> + * public class MyControl extends AbstractControl implements Stateful { + * + * private String value; + * + * ... + * + * // Return the Control internal state + * public Object getState() { + * return getValue(); + * } + * + * // Set the Control internal state + * public void setState(Object state) { + * String fieldState = (String) state; + * setValue(fieldState); + * } + * + * // A save state helper method + * public void saveState(Context context) { + * // Save the control state in the session + * ClickUtils.saveState(this, getName(), context); + * } + * // A restore state helper method + * public void restoreState(Context context) { + * // Load the control state from the session + ClickUtils.restoreState(this, getName(), context); + * } + * + * // A remove state helper method + * public void removeState(Context context) { + * // Remove the control state from the session +* ClickUtils.removeState(this, getName(), context); + * } + * + * } </pre> + * + * Saving and restoring Control state is controlled by the developer. + * <p/> + * For example: + * + * <pre class="prettyprint"> + * public class MyPage extends Page { + * + * private MyControl control = new MyControl("mycontrol"); + * + * public MyPage() { + * // Load the control state from the session + * control.loadState(getContext()); + * } + * + * public void onPost() { + * + * Context context = getContext(); + * + * String id = context.getParameter("id"); + * control.setValue(id); + * + * // Save control state to the session + * control.saveState(context); + * } + * } + * </pre> + */ +public interface Stateful { + + /** + * Return the Control internal state. State will generally be stored in the + * Session, so it is recommended to ensure the state is + * {@link java.io.Serializable serializable}. + * <p/> + * Example implementation below: + * <pre class="prettyprint"> + * public Object getState() { + * Object stateArray[] = new Object[3]; + * stateArray[0] = getValue(); + * stateArray[1] = Number.valueOf(getNumber()); + * stateArray[2] = Boolean.valueOf(getBoolean()); + * return stateArray; + * } </pre> + * + * @return the control internal state + */ + public Object getState(); + + /** + * Restore the Control internal state from the given state object. + * <p/> + * Example below: + * <pre class="prettyprint"> + * public void setState(Object state) { + * + * Object[] stateArray = (Object[]) state; + * String storedValue = stateArray[0]; + * setValue(storedValue); + * + * int storedNumber = ((Integer) stateArray[1]).intValue(); + * setNumber(storedNumber); + * + * boolean storedBoolen = ((Boolean) stateArray[2]).booleanValue(); + * setBoolean(storedBoolean); + * } </pre> + * + * @param state the control state to restore + */ + public void setState(Object state); +} Modified: click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java?rev=1023422&r1=1023421&r2=1023422&view=diff ============================================================================== --- click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java (original) +++ click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Sun Oct 17 04:11:26 2010 @@ -61,6 +61,7 @@ import org.apache.click.Context; import org.apache.click.Control; import org.apache.click.Page; import org.apache.click.ActionResult; +import org.apache.click.Stateful; import org.apache.click.control.AbstractControl; import org.apache.click.control.AbstractLink; import org.apache.click.control.ActionLink; @@ -2566,6 +2567,112 @@ public class ClickUtils { } /** + * Remove the control state from the session for the given stateful control, + * control name and request context. + * + * @param control the stateful control which state to restore + * @param controlName the name of the control which state to restore + * @param context the request context + */ + public static void removeState(Stateful control, String controlName, Context context) { + if (control == null) { + throw new IllegalStateException("Control cannot be null."); + } + if (controlName == null) { + throw new IllegalStateException(ClassUtils.getShortClassName(control.getClass()) + + " name has not been set. State cannot be restored until the name is set"); + } + if (context == null) { + throw new IllegalStateException("Context cannot be null."); + } + + String resourcePath = context.getResourcePath(); + Map pageMap = ClickUtils.getPageState(resourcePath, context); + if (pageMap != null) { + Object pop = pageMap.remove(controlName); + + // Check if control state was emoved + if (pop != null) { + // If control state was removed, set session attribute to force + // session replication in a cluster + context.setSessionAttribute(resourcePath, pageMap); + } + } + } + + /** + * Restore the control state from the session for the given stateful control, + * control name and request context. + * <p/> + * This method delegates to {@link org.apache.click.Stateful#setState(java.lang.Object)} + * to restore the control state. + * + * @param control the stateful control which state to restore + * @param controlName the name of the control which state to restore + * @param context the request context + */ + public static void restoreState(Stateful control, String controlName, Context context) { + if (control == null) { + throw new IllegalStateException("Control cannot be null."); + } + if (controlName == null) { + throw new IllegalStateException(ClassUtils.getShortClassName(control.getClass()) + + " name has not been set. State cannot be restored until the name is set"); + } + if (context == null) { + throw new IllegalStateException("Context cannot be null."); + } + + String resourcePath = context.getResourcePath(); + Map pageMap = ClickUtils.getPageState(resourcePath, context); + if (pageMap != null) { + control.setState(pageMap.get(controlName)); + } + } + + /** + * Save the control state in the session for the given stateful control, + * control name and request context. + * <p/> + * * This method delegates to {@link org.apache.click.Stateful#getState()} + * to retrieve the control state to save. + * + * @param control the stateful control which state to save + * @param controlName the name of the control control which state to save + * @param context the request context + */ + public static void saveState(Stateful control, String controlName, Context context) { + if (control == null) { + throw new IllegalStateException("Control cannot be null."); + } + if (controlName == null) { + throw new IllegalStateException(ClassUtils.getShortClassName(control.getClass()) + + " name has not been set. State cannot be saved until the name is set"); + } + if (context == null) { + throw new IllegalStateException("Context cannot be null."); + } + + String resourcePath = context.getResourcePath(); + Map pageMap = getOrCreatePageState(resourcePath, context); + Object state = control.getState(); + if (state == null) { + // Set null state to see if it differs from previous state + Object pop = pageMap.put(controlName, state); + if(pop != null) { + // Previous state differs from current state, so set the + // session attribute to force session replication in a cluster + context.setSessionAttribute(resourcePath, pageMap); + } + } else { + pageMap.put(controlName, state); + // After control state has been added to the page state, set the + // session attribute to force session replication in a cluster + context.setSessionAttribute(resourcePath, pageMap); + } + } + + /** * Return the getter method name for the given property name. * * @param property the property name @@ -3129,6 +3236,42 @@ public class ClickUtils { } /** + * Retrieve or create the map where page state is stored in. + * + * @see #getPageState(java.lang.String, org.apache.click.Context) + * + * @param pagePath the path under which the page state is stored in the + * session + * @param context the request context + * @return the map where page state is stored in + */ + private static Map getOrCreatePageState(String pagePath, Context context) { + Map pageMap = getPageState(pagePath, context); + if (pageMap == null) { + pageMap = new HashMap(); + } + return pageMap; + } + + /** + * Retrieve the map for the given pagePath from the session where page state + * is stored in. + * + * @param pagePath the path under which the page state is stored in the + * session + * @param context the request context + * @return the map where page state is stored in + */ + private static Map getPageState(String pagePath, Context context) { + Object storedPageValue = context.getSessionAttribute(pagePath); + Map pageMap = null; + if (storedPageValue != null) { + pageMap = (Map) storedPageValue; + } + return pageMap; + } + + /** * Invoke the named method on the given target object and return the result. * * @param target the target object with the method to invoke From commitsgibbsjoseph@example.org Sun Oct 17 11:27:19 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 85049 invoked from network); 17 Oct 2010 11:27:19 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 17 Oct 2010 11:27:19 -0000 Received: (qmail 55431 invoked by uid 500); 17 Oct 2010 11:27:19 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 55417 invoked by uid 500); 17 Oct 2010 11:27:18 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 55402 invoked by uid 99); 17 Oct 2010 11:27:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 11:27:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 11:27:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7CDDD23889E1; Sun, 17 Oct 2010 11:26:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1023460 - /click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Date: Sun, 17 Oct 2010 11:26:21 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Sun Oct 17 11:26:21 2010 New Revision: 1023460 URL: http://svn.apache.org/viewvc?rev=1023460&view=rev Log: Remove the page state when the last control state is removed. CLK-715 Modified: click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Modified: click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java?rev=1023460&r1=1023459&r2=1023460&view=diff ============================================================================== --- click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java (original) +++ click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Sun Oct 17 11:26:21 2010 @@ -2591,11 +2591,16 @@ public class ClickUtils { if (pageMap != null) { Object pop = pageMap.remove(controlName); - // Check if control state was emoved - if (pop != null) { - // If control state was removed, set session attribute to force - // session replication in a cluster - context.setSessionAttribute(resourcePath, pageMap); + if (pageMap.isEmpty()) { + // If this was the last state for the page, remove the page state map + context.removeSessionAttribute(resourcePath); + } else { + // Check if control state was emoved + if (pop != null) { + // If control state was removed, set session attribute to force + // session replication in a cluster + context.setSessionAttribute(resourcePath, pageMap); + } } } } From commitsgibbsjoseph@example.org Sun Oct 17 12:31:10 2010 Return-Path: <commitsgibbsjoseph@example.org> Delivered-To: gibbsjoseph@example.org Received: (qmail 6903 invoked from network); 17 Oct 2010 12:31:09 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 17 Oct 2010 12:31:09 -0000 Received: (qmail 94866 invoked by uid 500); 17 Oct 2010 12:31:09 -0000 Delivered-To: gibbsjoseph@example.org Received: (qmail 94852 invoked by uid 500); 17 Oct 2010 12:31:09 -0000 Mailing-List: contact gibbsjoseph@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gibbsjoseph@example.org> List-Unsubscribe: <mailto:gibbsjoseph@example.org> List-Post: <mailto:gibbsjoseph@example.org> List-Id: <commits.click.apache.org> Reply-To: gibbsjoseph@example.org Delivered-To: mailing list gibbsjoseph@example.org Received: (qmail 94844 invoked by uid 99); 17 Oct 2010 12:31:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 12:31:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 12:31:07 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B629E23889F1; Sun, 17 Oct 2010 12:30:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1023477 - in /click/trunk/click/framework/src/org/apache/click/control: Field.java FieldSet.java Form.java Date: Sun, 17 Oct 2010 12:30:11 -0000 To: gibbsjoseph@example.org From: gibbsjoseph@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <gibbsjoseph@example.org> Author: sabob Date: Sun Oct 17 12:30:11 2010 New Revision: 1023477 URL: http://svn.apache.org/viewvc?rev=1023477&view=rev Log: added stateful support for Form, FieldSet and Field. CLK-715 Modified: click/trunk/click/framework/src/org/apache/click/control/Field.java click/trunk/click/framework/src/org/apache/click/control/FieldSet.java click/trunk/click/framework/src/org/apache/click/control/Form.java Modified: click/trunk/click/framework/src/org/apache/click/control/Field.java URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/Field.java?rev=1023477&r1=1023476&r2=1023477&view=diff ============================================================================== --- click/trunk/click/framework/src/org/apache/click/control/Field.java (original) +++ click/trunk/click/framework/src/org/apache/click/control/Field.java Sun Oct 17 12:30:11 2010 @@ -21,6 +21,7 @@ package org.apache.click.control; import org.apache.click.Context; import org.apache.click.Control; import org.apache.click.Page; +import org.apache.click.Stateful; import org.apache.commons.lang.StringUtils; import org.apache.click.util.ClickUtils; @@ -179,7 +180,7 @@ import org.apache.click.util.HtmlStringB * </dd> * </dl> */ -public abstract class Field extends AbstractControl { +public abstract class Field extends AbstractControl implements Stateful { // Constants -------------------------------------------------------------- @@ -1033,6 +1034,36 @@ public abstract class Field extends Abst } /** + * Return the Field state. The following state is returned: + * <ul> + * <li>{@link #getValue() field value}</li> + * </ul> + * + * @return the Field state + */ + public Object getState() { + String state = getValue(); + if (StringUtils.isEmpty(state)) { + return null; + } + return state; + } + + /** + * Set the Field state. + * + * @param state the Field state to set + */ + public void setState(Object state) { + if (state == null) { + return; + } + + String fieldState = (String) state; + setValue(fieldState); + } + + /** * This method processes the page request returning true to continue * processing or false otherwise. The Field <tt>onProcess()</tt> method is * typically invoked by the Form <tt>onProcess()</tt> method when @@ -1085,6 +1116,48 @@ public
{'source': 'Apache Software Foundation Public Mail Archives'}