[seam-commits] Seam SVN: r15249 - branches/enterprise/WFK-2_1/jboss-seam-mail/src/main/java/org/jboss/seam/mail/ui.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Oct 11 10:21:41 EDT 2012


Author: manaRH
Date: 2012-10-11 10:21:41 -0400 (Thu, 11 Oct 2012)
New Revision: 15249

Modified:
   branches/enterprise/WFK-2_1/jboss-seam-mail/src/main/java/org/jboss/seam/mail/ui/UIBody.java
Log:
JBSEAM-4811 - fixed adding multipart in email

Modified: branches/enterprise/WFK-2_1/jboss-seam-mail/src/main/java/org/jboss/seam/mail/ui/UIBody.java
===================================================================
--- branches/enterprise/WFK-2_1/jboss-seam-mail/src/main/java/org/jboss/seam/mail/ui/UIBody.java	2012-10-11 14:21:28 UTC (rev 15248)
+++ branches/enterprise/WFK-2_1/jboss-seam-mail/src/main/java/org/jboss/seam/mail/ui/UIBody.java	2012-10-11 14:21:41 UTC (rev 15249)
@@ -2,6 +2,7 @@
 
 import java.io.IOException;
 import java.util.List;
+import java.util.ArrayList;
 
 import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
@@ -80,7 +81,9 @@
                }
                else
                {
-                  getRootMultipart().addBodyPart(attachment);
+                  // reset the attachment list after adding to message body
+                  // This is because ui:message can be in ui:repeat tag JBSEAM-4811
+                  findMessage().setAttachments(new ArrayList<MimeBodyPart>());
                }
             }
          }
@@ -167,4 +170,4 @@
       
       return false;
    }
-}
\ No newline at end of file
+}



More information about the seam-commits mailing list