velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r534265 - /velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java
Date Tue, 01 May 2007 22:38:30 GMT
Author: nbubna
Date: Tue May  1 15:38:28 2007
New Revision: 534265

URL: http://svn.apache.org/viewvc?view=rev&rev=534265
Log:
keep deprecated init() method for backwards compatibility

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

Modified: velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java?view=diff&rev=534265&r1=534264&r2=534265
==============================================================================
--- velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java
(original)
+++ velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java
Tue May  1 15:38:28 2007
@@ -22,11 +22,12 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.InvalidScope;
-import org.apache.velocity.tools.view.ViewContext;
+import org.apache.velocity.tools.ToolContext;
 
 /**
  * <p>Abstract view tool for doing request-based pagination of
@@ -143,6 +144,17 @@
         }
         this.session = request.getSession(false);
         setup(request);
+    }
+
+    public void setup(Map params)
+    {
+        init(params.get(ToolContext.CONTEXT_KEY));
+    }
+
+    @Deprecated
+    public void init(Object obj)
+    {
+        //Does nothing
     }
 
     /**



Mime
View raw message