click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r959329 - in /click/trunk/click/documentation/docs: roadmap-changes.html upgrade-path.html
Date Wed, 30 Jun 2010 14:29:03 GMT
Author: sabob
Date: Wed Jun 30 14:29:03 2010
New Revision: 959329

URL: http://svn.apache.org/viewvc?rev=959329&view=rev
Log:
roadmap

Modified:
    click/trunk/click/documentation/docs/roadmap-changes.html
    click/trunk/click/documentation/docs/upgrade-path.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=959329&r1=959328&r2=959329&view=diff
==============================================================================
--- click/trunk/click/documentation/docs/roadmap-changes.html (original)
+++ click/trunk/click/documentation/docs/roadmap-changes.html Wed Jun 30 14:29:03 2010
@@ -79,6 +79,10 @@ includes improved Ajax support and @Bind
       <div class="release-header">Latest Release - Version 2.3.0 Milestone 1 - ?? July
2010</div>
   </dt>
   <dd>
+      <div style="margin-left:-2em;margin-bottom:1em;">
+      <b>IMPORTANT:</b> be sure to read the <a href="upgrade-path.html#2.3.0">upgrade
path</a>
+      when upgrading from previous releases.
+      </div>
       <div style="margin-left: -2em; margin-top: 1.5em; margin-bottom: 1em;">
       <b>New examples:</b>
       </div>
@@ -88,6 +92,44 @@ includes improved Ajax support and @Bind
           [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-544">CLK-544</a>].
         </li>
       </ul>
+
+    <div style="margin-left: -2em; margin-top: 1.5em; margin-bottom: 1em;">
+      <b>Deprecated:</b>
+    </div>
+    <ul style="padding: 0em; margin-left:0em;margin-bottom: 2em">
+      <li class="change">
+          Deprecated the AbstractLink <tt>parameter</tt> getter methods. You
should
+          still set parameters on links, however binding link parameters to incoming
+          request parameters will be removed in a future release. The main issues
+          with binding link parameters is that all incoming request parameters
+          are bound which can lead to undesirable link parameters (especially
+          problematic for Ajax requests) and possibly memory leaks.
+          <p/>
+          Deprecated methods are:
+          <ul>
+              <li>
+                  <a href="click-api/org/apache/click/control/AbstractLink.html#getParameter(java.lang.String)">AbstractLink.getParameter(String)</a>
+                  - use <a href="click-api/org/apache/click/Context.html#getRequestParameter(java.lang.String)">Context.getRequestParameter(String)</a>
+                  instead
+              </li>
+              <li>
+                  <a href="click-api/org/apache/click/control/AbstractLink.html#getParameters()">AbstractLink.getParameters()</a>
+                  - use <a href="click-api/org/apache/click/Context.html#getRequest()">HttpServletRequest.getParameterMap()</a>
+                  instead
+              </li>
+              <li>
+                  <a href="click-api/org/apache/click/control/AbstractLink.html#getParameterValues(java.lang.String)">AbstractLink.getParameterValues(String)</a>
+                  - use <a href="click-api/org/apache/click/Context.html#getRequestParameterValues(java.lang.String)">Context.getRequestParameterValues(String)</a>
+                  instead
+              </li>
+              <li>
+                  <a href="extras-api/org/apache/click/extras/control/SubmitLink.html#setParameterPrefix(java.lang.String)">SubmitLink.setParameterPrefix(String)</a>
+                  - parameter prefixing was only necessary for binding incoming
+                  request parameters
+              </li>
+           </ul>
+      </li>
+    </ul>
       <div style="margin-left: -2em; margin-top: 1.5em; margin-bottom: 1em;">
         <b>New features and issues resolved:</b>
       </div>
@@ -134,8 +176,7 @@ Select.setAttribute("onchange", "Click.s
               [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-705">CLK-705</a>].
           </li>
           <li class="change">
-              Added a strict parameter binding strategy for AbstractLink and
-              ActionButton. This option restricts incoming parameters to be
+              Deprecated
               added only to explicitly defined parameters. By default this option
               will be true for ajax requests, false for non-ajax requests
               [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-685">CLK-685</a>].
@@ -181,7 +222,7 @@ Select.setAttribute("onchange", "Click.s
   </dt>
   <dd>
     <div style="margin-left:-2em;margin-bottom:1em;">
-        <b>IMPORTANT:</b> be sure to read the <a href="upgrade-path.html#2.2.0">upgrade
path</a>
+      <b>IMPORTANT:</b> be sure to read the <a href="upgrade-path.html#2.2.0">upgrade
path</a>
       when upgrading from previous releases.
       <p/>
       Its worth highlighting that in this release we have removed the deprecated methods

Modified: click/trunk/click/documentation/docs/upgrade-path.html
URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/upgrade-path.html?rev=959329&r1=959328&r2=959329&view=diff
==============================================================================
--- click/trunk/click/documentation/docs/upgrade-path.html (original)
+++ click/trunk/click/documentation/docs/upgrade-path.html Wed Jun 30 14:29:03 2010
@@ -84,7 +84,57 @@ versions please email the Click user gro
   <dd>
     <ul style="padding: 0em; margin-left:0em;margin-bottom: 2em">
       <li class="change">
-        2.3.0 is backwards compatible with 2.2.0.
+        AbstractLink binds all incoming request parameters to its own parameter map.
+        There are a number of pitfalls binding parameters to links, namely:
+        <ul style="margin-top:1em">
+            <li>
+                all parameters are bound to the link, even unwanted parameters. This
+                becomes prevalent when replacing the default link behavior
+                with Ajax requests. The Ajax parameters are bound to link
+                parameters, leading to links that render parameters not meant for
+                that link
+            </li>
+            <li>
+                it can lead to memory leaks in stateful pages
+            </li>
+        </ul>
+        If you are using one of the deprecated <tt>getter</tt> methods, you can
+        simply replace it with their Context counterparts:
+        <ul style="margin-top:1em">
+            <li>
+                replace <a href="click-api/org/apache/click/control/AbstractLink.html#getParameter(java.lang.String)">AbstractLink.getParameter(String)</a>
+                with <a href="click-api/org/apache/click/Context.html#getRequestParameter(java.lang.String)">Context.getRequestParameter(String)</a>
+            </li>
+            <li>
+                replace <a href="click-api/org/apache/click/control/AbstractLink.html#getParameters()">AbstractLink.getParameters()</a>
+                with <a href="click-api/org/apache/click/Context.html#getRequest()">HttpServletRequest.getParameterMap()</a>
+            </li>
+            <li>
+                replace <a href="click-api/org/apache/click/control/AbstractLink.html#getParameterValues(java.lang.String)">AbstractLink.getParameterValues(String)</a>
+                with <a href="click-api/org/apache/click/Context.html#getRequestParameterValues(java.lang.String)">Context.getRequestParameterValues(String)</a>
+            </li>
+        </ul>
+        Before:
+        <pre class="prettyprint">
+public void onGet() {
+    if (link.isClicked()) {
+        String value = link.getValue();
+        String id = link.getParameter("id");
+        String[] myArray = link.getParameterValues("myArray");
+    }
+}
+</pre>
+        After:
+        <pre class="prettyprint">
+public void onGet() {
+    if (link.isClicked()) {
+        Context context = getContext();
+        String value = link.getValue();
+        String id = context.getRequestParameter("id");
+        String[] myArray = context.getRequestParameterValues("myArray");
+    }
+}
+</pre>
       </li>
       <li class="change">
         The DateField control now accepts month and day names spelled in the 



Mime
View raw message