Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow
In directory james.mmbase.org:/tmp/cvs-serv942/pageflow

Modified Files:
        Url.java UrlTag.java UrlWriterTag.java 
Log Message:
Made it possible to explicitely create 'process' urls


See also: 
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow


Index: Url.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/Url.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- Url.java    22 Dec 2008 14:51:49 -0000      1.50
+++ Url.java    5 Jan 2009 18:36:53 -0000       1.51
@@ -35,7 +35,7 @@
  * <p>
  * The creation of the URL is delegated to the MMBase framework.
  * </p>
- * @version $Id: Url.java,v 1.50 2008/12/22 14:51:49 michiel Exp $;
+ * @version $Id: Url.java,v 1.51 2009/01/05 18:36:53 michiel Exp $;
  * @since MMBase-1.9
  */
 public class Url implements Comparable, CharSequence, Casting.Unwrappable {
@@ -189,11 +189,14 @@
         } else {
             if (process) {
                 result = framework.getProcessUrl(page, params, 
frameworkParameters, escapeamp);
+                if (log.isDebugEnabled()) {
+                    log.debug("Created normal process url link to page: " + 
page + " " + params + " fw: " + frameworkParameters + " -> " + result);
+                }
             } else {
                 result = framework.getUrl(page, params, frameworkParameters, 
escapeamp);
-            }
             if (log.isDebugEnabled()) {
-                log.debug("Created normal url link to page: " + page + " " + 
params + " fw: " + frameworkParameters + " -> " + result + " fw");
+                    log.debug("Created normal url link to page: " + page + " " 
+ params + " fw: " + frameworkParameters + " -> " + result);
+                }
             }
         }
         {


Index: UrlTag.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/UrlTag.java,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- UrlTag.java 22 Dec 2008 16:12:06 -0000      1.122
+++ UrlTag.java 5 Jan 2009 18:36:53 -0000       1.123
@@ -30,7 +30,7 @@
  * A Tag to produce an URL with parameters. It can use 'context' parameters 
easily.
  *
  * @author Michiel Meeuwissen
- * @version $Id: UrlTag.java,v 1.122 2008/12/22 16:12:06 michiel Exp $
+ * @version $Id: UrlTag.java,v 1.123 2009/01/05 18:36:53 michiel Exp $
  */
 
 public class UrlTag extends CloudReferrerTag  implements  ParamHandler, 
FrameworkParamHandler {
@@ -48,6 +48,7 @@
     protected Attribute  absolute             = Attribute.NULL;
     private   Attribute  encode               = Attribute.NULL;
     private   Attribute  internal             = Attribute.NULL;
+    private   Attribute  process              = Attribute.NULL;
     protected Url        url;
 
     public void setReferids(String r) throws JspTagException {
@@ -91,6 +92,15 @@
         internal = getAttribute(i);
     }
 
+
+    /**
+     * @since MMBase-1.9.1
+     */
+
+    public void setProcess(String p) throws JspTagException {
+        process = getAttribute(p, true);
+    }
+
     /**
      * @since MMBase-1.9
      */
@@ -106,6 +116,7 @@
     }
 
 
+
     public void addParameter(String key, Object value) throws JspTagException {
         Url.addParameter(extraParameters, key, value);
         if (url != null) {
@@ -148,6 +159,9 @@
             ur = url;
         } else {
             ur = new Url(url, eu);
+            if (process.getBoolean(this, false)) {
+                ur.setProcess();
+            }
         }
         try {
             return ur.get(escapeAmps.getBoolean(this, true));
@@ -179,14 +193,23 @@
                 extraParameters.putAll(u.params);
                 frameworkParameters.putAll(u.frameworkParams);
                 url = new Url(this, u, frameworkParameters, parameters, 
internal);
+                if (process.getBoolean(this, false)) {
+                    url.setProcess();
+                }
             } else {
                 url = new Url(this,
                               getPage(Casting.toString(o)),
                               frameworkParameters,
                               parameters, internal);
+                if (process.getBoolean(this, false)) {
+                    url.setProcess();
+                }
             }
         } else {
             url = new Url(this, getPage(getPage()), frameworkParameters, 
parameters, internal);
+            if (process.getBoolean(this, false)) {
+                url.setProcess();
+            }
         }
 
         if (getId() != null) {


Index: UrlWriterTag.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/UrlWriterTag.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- UrlWriterTag.java   10 Feb 2007 16:49:27 -0000      1.13
+++ UrlWriterTag.java   5 Jan 2009 18:36:53 -0000       1.14
@@ -21,7 +21,7 @@
  * Can be used with EL. ${_} is only evaluated when used.
  *
  * @author Michiel Meeuwissen
- * @version $Id: UrlWriterTag.java,v 1.13 2007/02/10 16:49:27 nklasens Exp $
+ * @version $Id: UrlWriterTag.java,v 1.14 2009/01/05 18:36:53 michiel Exp $
  * @since MMBase-1.8
  */
 
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to