[seam-commits] Seam SVN: r11151 - in branches/community/Seam_2_2: examples/mail/view and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Jun 12 20:06:44 EDT 2009
Author: danielc.roth
Date: 2009-06-12 20:06:44 -0400 (Fri, 12 Jun 2009)
New Revision: 11151
Added:
branches/community/Seam_2_2/examples/mail/view/excel.xhtml
Modified:
branches/community/Seam_2_2/examples/mail/build.xml
branches/community/Seam_2_2/examples/mail/view/attachment.xhtml
branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
Log:
JBSEAM-3948 Same special treatment for Excel as PDF to send docs easy
Modified: branches/community/Seam_2_2/examples/mail/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/mail/build.xml 2009-06-12 23:37:01 UTC (rev 11150)
+++ branches/community/Seam_2_2/examples/mail/build.xml 2009-06-13 00:06:44 UTC (rev 11151)
@@ -10,6 +10,7 @@
<property name="seam.mail.lib" value="yes" />
<property name="deploy.meldware.mail" value="yes" />
<property name="seam.pdf.lib" value="yes"/>
+ <property name="seam.excel.lib" value="yes"/>
<property name="seam.debug.lib" value="yes" />
<property name="facelets.lib" value="yes" />
@@ -31,6 +32,7 @@
<path id="build.classpath.extras">
<path location="${lib.dir}/jboss-seam-mail.jar" />
<path location="${lib.dir}/jboss-seam-pdf.jar" />
+ <path location="${lib.dir}/jboss-seam-excel.jar" />
</path>
</project>
Modified: branches/community/Seam_2_2/examples/mail/view/attachment.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/mail/view/attachment.xhtml 2009-06-12 23:37:01 UTC (rev 11150)
+++ branches/community/Seam_2_2/examples/mail/view/attachment.xhtml 2009-06-13 00:06:44 UTC (rev 11151)
@@ -12,6 +12,9 @@
<m:attachment fileName="whyseam.pdf">
<ui:include src="/whyseam.xhtml" />
</m:attachment>
+ <m:attachment fileName="excel.pdf">
+ <ui:include src="/excel.xhtml" />
+ </m:attachment>
<ui:repeat value="#{people}" var="p">
<m:attachment value="#{p.photo}" contentType="image/jpeg" fileName="#{p.firstname}_#{p.lastname}.jpg" />
</ui:repeat>
Added: branches/community/Seam_2_2/examples/mail/view/excel.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/mail/view/excel.xhtml (rev 0)
+++ branches/community/Seam_2_2/examples/mail/view/excel.xhtml 2009-06-13 00:06:44 UTC (rev 11151)
@@ -0,0 +1,6 @@
+<e:workbook xmlns:e="http://jboss.com/products/seam/excel" xmlns:f="http://java.sun.com/jsf/core">
+ <e:worksheet name="Developers">
+ <e:cell column="0" row="0" value="Daniel Roth" />
+ <e:cell column="0" row="1" value="Nicklas Karlsson" />
+ </e:worksheet>
+</e:workbook>
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 2009-06-12 23:37:01 UTC (rev 11150)
+++ branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java 2009-06-13 00:06:44 UTC (rev 11151)
@@ -85,7 +85,8 @@
public void encodeBegin(FacesContext context) throws IOException
{
if (this.getChildCount() > 0) {
- if (Reflections.isInstanceOf(this.getChildren().get(0).getClass(), "org.jboss.seam.pdf.ui.UIDocument"))
+ if (Reflections.isInstanceOf(this.getChildren().get(0).getClass(), "org.jboss.seam.pdf.ui.UIDocument") ||
+ Reflections.isInstanceOf(this.getChildren().get(0).getClass(), "org.jboss.seam.excel.ui.UIWorkbook"))
{
Method method = Reflections.getSetterMethod(this.getChildren().get(0).getClass(), "sendRedirect");
Reflections.invokeAndWrap(method, this.getChildren().get(0), false);
More information about the seam-commits
mailing list