Update of /var/cvs/src/org/mmbase/module/builders
In directory james.mmbase.org:/tmp/cvs-serv19713/module/builders

Modified Files:
      Tag: MMBase-1_8
        AbstractServletBuilder.java 
Log Message:
ported generic 'url' function from HEAD


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/builders


Index: AbstractServletBuilder.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/builders/AbstractServletBuilder.java,v
retrieving revision 1.42.2.4
retrieving revision 1.42.2.5
diff -u -b -r1.42.2.4 -r1.42.2.5
--- AbstractServletBuilder.java 10 Jun 2008 11:10:30 -0000      1.42.2.4
+++ AbstractServletBuilder.java 27 Oct 2008 17:00:41 -0000      1.42.2.5
@@ -30,7 +30,7 @@
  *
  *
  * @author Michiel Meeuwissen
- * @version $Id: AbstractServletBuilder.java,v 1.42.2.4 2008/06/10 11:10:30 
michiel Exp $
+ * @version $Id: AbstractServletBuilder.java,v 1.42.2.5 2008/10/27 17:00:41 
michiel Exp $
  * @since   MMBase-1.6
  */
 public abstract class AbstractServletBuilder extends MMObjectBuilder {
@@ -511,11 +511,16 @@
                 }
             });
 
-    }
-
 
+        addFunction(new NodeFunction("url", new Parameter[] { 
Parameter.REQUEST, Parameter.CLOUD }, ReturnType.STRING) {
+                public Object getFunctionValue(Node node, Parameters a) {
+                    Function spFunction = node.getFunction("servletpath");
+                    Parameters p = spFunction.createParameters();
+                    p.setAll(a);
+                    return  node.getFunctionValue("servletpath", p).toString();
+                }
+            });
 
-    {
         /**
          * @since MMBase-1.8
          */
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to