You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by ta...@apache.org on 2009/04/28 04:16:14 UTC

svn commit: r769220 - /incubator/click/trunk/click/framework/src/org/apache/click/util/Format.java

Author: takezoe
Date: Tue Apr 28 02:16:13 2009
New Revision: 769220

URL: http://svn.apache.org/viewvc?rev=769220&view=rev
Log:
[CLK-399]Add Format#url()

Modified:
    incubator/click/trunk/click/framework/src/org/apache/click/util/Format.java

Modified: incubator/click/trunk/click/framework/src/org/apache/click/util/Format.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/util/Format.java?rev=769220&r1=769219&r2=769220&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/util/Format.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/util/Format.java Tue Apr 28 02:16:13 2009
@@ -781,4 +781,14 @@
             return getEmptyString();
         }
     }
+    
+    /**
+     * Return an encoded URL value for the given object.
+     * 
+     * @param object the object value to encode as a URL string
+     * @return an encoded URL string
+     */
+    public String url(Object object) {
+        return ClickUtils.encodeUrl(object, Context.getThreadLocalContext());
+    }
 }