You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2012/07/04 12:28:58 UTC

svn commit: r1357215 - in /myfaces/tobago/trunk: ./ tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/r...

Author: bommel
Date: Wed Jul  4 10:28:57 2012
New Revision: 1357215

URL: http://svn.apache.org/viewvc?rev=1357215&view=rev
Log:
(TOBAGO-1170) Ensure enctype multipart/form-data for the form in a case of a ajax load of fileinput

Modified:
    myfaces/tobago/trunk/pom.xml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/pom.xml?rev=1357215&r1=1357214&r2=1357215&view=diff
==============================================================================
--- myfaces/tobago/trunk/pom.xml (original)
+++ myfaces/tobago/trunk/pom.xml Wed Jul  4 10:28:57 2012
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.myfaces</groupId>
     <artifactId>myfaces</artifactId>
-    <version>14</version>
+    <version>10</version>
   </parent>
   <groupId>org.apache.myfaces.tobago</groupId>
   <artifactId>tobago</artifactId>
@@ -338,7 +338,7 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>findbugs-maven-plugin</artifactId>
-        <version>2.3.2</version>
+        <version>2.5.1</version>
         <configuration>
           <threshold>Low</threshold>
           <effort>Max</effort>

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java?rev=1357215&r1=1357214&r2=1357215&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java Wed Jul  4 10:28:57 2012
@@ -18,6 +18,7 @@ package org.apache.myfaces.tobago.render
  */
 
 import org.apache.commons.fileupload.FileItem;
+import org.apache.myfaces.tobago.ajax.AjaxUtils;
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.internal.component.AbstractUIFile;
 import org.apache.myfaces.tobago.internal.util.FacesContextUtils;

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1357215&r1=1357214&r2=1357215&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Wed Jul  4 10:28:57 2012
@@ -2667,6 +2667,9 @@ Tobago.File.init = function(elements) {
     }
     pretty.attr('value', filename);
   });
+  if (files.length > 0) {
+    jQuery("form").attr('enctype', 'multipart/form-data')
+  }
 };
 
 Tobago.registerListener(Tobago.File.init, Tobago.Phase.DOCUMENT_READY);