You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2012/10/15 13:15:37 UTC

[1/2] git commit: Fix Clirr error

Updated Branches:
  refs/heads/master 89ba7211f -> e796c6e8b


Fix Clirr error


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e796c6e8
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e796c6e8
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e796c6e8

Branch: refs/heads/master
Commit: e796c6e8b6d0225ed859b1eb3ab33558a7561cc7
Parents: 752f5ba
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Oct 15 13:15:14 2012 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Oct 15 13:15:14 2012 +0200

----------------------------------------------------------------------
 .../org/apache/wicket/markup/html/form/Form.java   |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/e796c6e8/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index 5021167..848b92f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -146,6 +146,8 @@ public class Form<T> extends WebMarkupContainer implements IFormSubmitListener
 {
 	private static final String HIDDEN_DIV_START = "<div style=\"width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden\">";
 
+	public static final String ENCTYPE_MULTIPART_FORM_DATA = "multipart/form-data";
+
 	/**
 	 * Visitor used for validation
 	 * 
@@ -1539,7 +1541,7 @@ public class Form<T> extends WebMarkupContainer implements IFormSubmitListener
 					tag.put("method", METHOD_POST.toLowerCase(Locale.ENGLISH));
 				}
 
-				tag.put("enctype", "multipart/form-data");
+				tag.put("enctype", ENCTYPE_MULTIPART_FORM_DATA);
 				//
 				// require the application-encoding for multipart/form-data to be sure to
 				// get multipart-uploaded characters with the proper encoding on the following
@@ -1554,7 +1556,7 @@ public class Form<T> extends WebMarkupContainer implements IFormSubmitListener
 			{
 				// sanity check
 				String enctype = (String)tag.getAttributes().get("enctype");
-				if ("multipart/form-data".equalsIgnoreCase(enctype))
+				if (ENCTYPE_MULTIPART_FORM_DATA.equalsIgnoreCase(enctype))
 				{
 					// though not set explicitly in Java, this is a multipart
 					// form