[jboss-cvs] jboss-seam/src/mail/org/jboss/seam/mail/ui ...
Peter Muir
peter at bleepbleep.org.uk
Sun Feb 4 07:59:06 EST 2007
User: pmuir
Date: 07/02/04 07:59:06
Modified: src/mail/org/jboss/seam/mail/ui UIAttachment.java
Log:
tidy up
Revision Changes Path
1.4 +4 -4 jboss-seam/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: UIAttachment.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/mail/org/jboss/seam/mail/ui/UIAttachment.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- UIAttachment.java 4 Feb 2007 01:21:20 -0000 1.3
+++ UIAttachment.java 4 Feb 2007 12:59:06 -0000 1.4
@@ -58,18 +58,19 @@
// TODO Set contenttype and filename
JSF.renderChildren(context, this);
} else {
- // Assume this is an HTML document
setValue(encode(context).getBytes());
+ if (getContentType() == null) {
+ // User hasn't specified content, assume html
setContentType("text/html");
}
}
}
+ }
@Override
public void encodeEnd(FacesContext context) throws IOException
{
DataSource ds = null;
- // TODO Support seam-pdf
try
{
if (getValue() instanceof URL)
@@ -94,7 +95,6 @@
}
else if (getValue() != null && getValue().getClass().isArray())
{
- Class clazz = getValue().getClass().getComponentType();
if (getValue().getClass().getComponentType().isAssignableFrom(Byte.TYPE))
{
byte[] b = (byte[]) getValue();
More information about the jboss-cvs-commits
mailing list