Author: norman.richards(a)jboss.com
Date: 2010-01-13 15:13:59 -0500 (Wed, 13 Jan 2010)
New Revision: 11955
Modified:
branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
Log:
JBSEAM-3906
Modified: branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
===================================================================
---
branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java 2010-01-13
20:01:06 UTC (rev 11954)
+++
branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java 2010-01-13
20:13:59 UTC (rev 11955)
@@ -164,7 +164,10 @@
MimeBodyPart attachment = new MimeBodyPart();
// Need to manually set the contentid
String contentId = RandomStringUtils.randomAlphabetic(20).toLowerCase();
- attachment.setContentID(new Header("<" + contentId +
">").getSanitizedValue());
+ if(disposition.equals("inline"))
+ {
+ attachment.setContentID(new Header("<" + contentId +
">").getSanitizedValue());
+ }
attachment.setDataHandler(new DataHandler(ds));
attachment.setFileName(new
Header(getName(ds.getName())).getSanitizedValue());
attachment.setDisposition(new Header(getDisposition()).getSanitizedValue());
@@ -172,7 +175,10 @@
if (getStatus() != null)
{
AttachmentStatus attachmentStatus = new AttachmentStatus();
- attachmentStatus.setContentId(contentId);
+ if(disposition.equals("inline"))
+ {
+ attachmentStatus.setContentId(contentId);
+ }
Contexts.getEventContext().set(getStatus(), attachmentStatus);
}
}
Show replies by date