velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r544635 - in /velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools: AbstractSearchTool.java ParameterParser.java
Date Tue, 05 Jun 2007 21:16:08 GMT
Author: nbubna
Date: Tue Jun  5 14:16:06 2007
New Revision: 544635

URL: http://svn.apache.org/viewvc?view=rev&rev=544635
Log:
was overzealous in trimming things from ParameterParser and AbstractSearchTool

Modified:
    velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java
    velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/ParameterParser.java

Modified: velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java?view=diff&rev=544635&r1=544634&r2=544635
==============================================================================
--- velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java
(original)
+++ velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java
Tue Jun  5 14:16:06 2007
@@ -20,6 +20,7 @@
  */
 
 import java.util.List;
+import org.apache.velocity.tools.view.ViewContext;
 
 /**
  * Use {@link org.apache.velocity.tools.view.tools.AbstractSearchTool}
@@ -28,6 +29,15 @@
 public abstract class AbstractSearchTool extends
     org.apache.velocity.tools.view.AbstractSearchTool
 {
+    @Deprecated
+    public void init(Object obj)
+    {
+        if (obj instanceof ViewContext)
+        {
+            setRequest(((ViewContext)obj).getRequest());
+        }
+    }
+
     /**
      * @deprecated Use {@link AbstractPagerTool#hasItems()}
      */

Modified: velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/ParameterParser.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/ParameterParser.java?view=diff&rev=544635&r1=544634&r2=544635
==============================================================================
--- velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/ParameterParser.java
(original)
+++ velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/ParameterParser.java
Tue Jun  5 14:16:06 2007
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import javax.servlet.ServletRequest;
 import org.apache.velocity.tools.view.ViewContext;
 
 /**
@@ -27,6 +28,23 @@
 @Deprecated
 public class ParameterParser extends org.apache.velocity.tools.view.ParameterTool
 {
+
+    /**
+     * Constructs a new instance
+     */
+    public ParameterParser()
+    {}
+
+    /**
+     * Constructs a new instance using the specified request.
+     *
+     * @param request the {@link ServletRequest} to be parsed
+     */
+    public ParameterParser(ServletRequest request)
+    {
+        setRequest(request);
+    }
+
     @Deprecated
     public void init(Object obj)
     {



Mime
View raw message