click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r919776 - /click/trunk/click/framework/src/org/apache/click/Context.java
Date Sat, 06 Mar 2010 14:53:15 GMT
Author: sabob
Date: Sat Mar  6 14:53:15 2010
New Revision: 919776

URL: http://svn.apache.org/viewvc?rev=919776&view=rev
Log:
added new Context methods, hasRequestParameter and hasRequestAttribute

Modified:
    click/trunk/click/framework/src/org/apache/click/Context.java

Modified: click/trunk/click/framework/src/org/apache/click/Context.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/Context.java?rev=919776&r1=919775&r2=919776&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/Context.java (original)
+++ click/trunk/click/framework/src/org/apache/click/Context.java Sat Mar  6 14:53:15 2010
@@ -316,6 +316,16 @@
     }
 
     /**
+     * Return true if the request contains the named attribute.
+     *
+     * @param name the name of the request attribute
+     * @return true if the request contains the named attribute
+     */
+    public boolean hasRequestAttribute(String name) {
+        return (getRequestAttribute(name) != null);
+    }
+
+    /**
      * Return the named request attribute, or null if not defined.
      *
      * @param name the name of the request attribute
@@ -336,6 +346,16 @@
     }
 
     /**
+     * Return true if the request contains the named parameter.
+     *
+     * @param name the name of the request parameter
+     * @return true if the request contains the named parameter
+     */
+    public boolean hasRequestParameter(String name) {
+        return (getRequestParameter(name) != null);
+    }
+
+    /**
      * Return the named request parameter. This method supports
      * <tt>"multipart/form-data"</tt> POST requests and should be used in
      * preference to the <tt>HttpServletRequest</tt> method



Mime
View raw message