Seam SVN: r8851 - branches/Seam_2_0_FP/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-29 07:54:14 -0400 (Fri, 29 Aug 2008)
New Revision: 8851
Modified:
branches/Seam_2_0_FP/build/common.build.xml
Log:
clean the workaround
Modified: branches/Seam_2_0_FP/build/common.build.xml
===================================================================
--- branches/Seam_2_0_FP/build/common.build.xml 2008-08-29 11:51:52 UTC (rev 8850)
+++ branches/Seam_2_0_FP/build/common.build.xml 2008-08-29 11:54:14 UTC (rev 8851)
@@ -124,9 +124,7 @@
<copyDependencies id="pdf" pom="${pdf.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="remoting" pom="${remoting.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="ui" pom="${ui.pom}" todir="${lib.dir}" scope="compile" />
- <copyDependencies id="gen" pom="${gen.pom}" todir="${lib.dir}" scope="compile" />
- <!-- globmapper doesn't work with ant 1.6.5-->
- <move file="${lib.dir}/mvel.jar" tofile="${lib.dir}/mvel14.jar"/>
+ <copyDependencies id="gen" pom="${gen.pom}" todir="${lib.dir}" scope="compile" />
<property name="copyseamdependenciesdone" value="true" />
</target>
16 years, 2 months
Seam SVN: r8850 - tags.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-29 07:51:52 -0400 (Fri, 29 Aug 2008)
New Revision: 8850
Removed:
tags/Seam_FP_CR3/
Log:
16 years, 2 months
Seam SVN: r8849 - tags.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-29 06:07:49 -0400 (Fri, 29 Aug 2008)
New Revision: 8849
Added:
tags/Seam_FP_CR3/
Log:
CR3 for build
Copied: tags/Seam_FP_CR3 (from rev 8848, branches/Seam_2_0_FP)
16 years, 2 months
Seam SVN: r8848 - branches/Seam_2_0_FP.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-29 06:03:01 -0400 (Fri, 29 Aug 2008)
New Revision: 8848
Modified:
branches/Seam_2_0_FP/changelog.txt
Log:
updated release notes
Modified: branches/Seam_2_0_FP/changelog.txt
===================================================================
--- branches/Seam_2_0_FP/changelog.txt 2008-08-29 09:36:46 UTC (rev 8847)
+++ branches/Seam_2_0_FP/changelog.txt 2008-08-29 10:03:01 UTC (rev 8848)
@@ -2,23 +2,22 @@
====================
Release Notes - JBoss Enterprise Platform App Edition - Version 4.3.0.GA_CP02_FP01
+
** Bug
+ * [JBPAPP-1012] - Remove unsupported things from feature pack
+ * [JBPAPP-1013] - Allow embedded jboss to run at same time as EAP
+ * [JBPAPP-1017] - Create local maven repository for Drools/JBpm dependencies
+ * [JBPAPP-1018] - Mark components/parts of SeamFP as technology preview
+ * [JBPAPP-1019] - Create brew build configuration files with maven dependencies
+ * [JBPAPP-1020] - Align library dependencies to EAP 4.3 CP02
* [JBPAPP-1087] - merge of issue: Spring example doesn't have in booking form generated checkout date field
- * [JBPAPP-1009] - java.net repo should not be used
- * [JBPAPP-1010] - Remove meldware
- * [JBPAPP-1011] - JDK 6 docs are wrong
- * [JBPAPP-1012] - Remove unsupported things from feature pack
- * [JBPAPP-1013] - Allow embedded jboss to run at same time as EAP
- * [JBPAPP-1016] - Switch to enterprise styles for docs
- * [JBPAPP-1017] - Create local maven repository for Drools/JBpm dependencies
- * [JBPAPP-1018] - Mark components/parts of SeamFP as technology preview
- * [JBPAPP-1020] - Align library dependencies to EAP 4.3 CP02
+ * [JBPAPP-1094] - Booking example - wrong message is displayed when canceling hotel booking
** Task
- * [JBPAPP-952] - Upgrade Hibernate, Hibernate Annotations and Hibernate Entity Manager
- * [JBPAPP-1047] - Merge fixed issues from Seam 2.0.3.CR1
- * [JBPAPP-1058] - Upgrade featured libraries to latest patch version in minor series
- * [JBPAPP-1066] - Mark the Hibernate Search integration as Technology Preview
+ * [JBPAPP-952] - Upgrade Hibernate, Hibernate Annotations and Hibernate Entity Manager
+ * [JBPAPP-1047] - Merge fixed issues from Seam 2.0.3.CR1
+ * [JBPAPP-1058] - Upgrade featured libraries to latest patch version in minor series
+ * [JBPAPP-1066] - Mark the Hibernate Search integration as Technology Preview
Release Notes - JBoss Seam - Version 2.0.2.SP1
16 years, 2 months
Seam SVN: r8847 - branches/Seam_2_0_FP.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-29 05:36:46 -0400 (Fri, 29 Aug 2008)
New Revision: 8847
Modified:
branches/Seam_2_0_FP/build.xml
Log:
remove wiki from undeployall
Modified: branches/Seam_2_0_FP/build.xml
===================================================================
--- branches/Seam_2_0_FP/build.xml 2008-08-29 08:53:45 UTC (rev 8846)
+++ branches/Seam_2_0_FP/build.xml 2008-08-29 09:36:46 UTC (rev 8847)
@@ -334,7 +334,7 @@
<undeployexample name="itext" />
<undeployexample name="mail" />
<undeployexample name="ui" />
- <!--<undeployexample name="spring"" /> />-->
+ <undeployexample name="spring" />
<undeployexample name="messages" />
<undeployexample name="numberguess" />
<undeployexample name="registration" />
@@ -346,7 +346,6 @@
<undeployexample name="remoting/gwt" />
<undeployexampleNoTomcat name="groovybooking" />
<undeployexample name="quartz" />
- <callExample path="examples/wiki" target="undeploy" />
<undeployexample name="seamdiscs" />
<undeployexample name="icefaces" />
<undeployexample name="seambay" />
@@ -448,7 +447,6 @@
<include name="hibernate/**/*" />
<include name="icefaces/**/*" />
<include name="jpa/**/*" />
- <include name="jee5/**/*" />
<include name="blog/**/*" />
<include name="contactlist/**/*" />
<include name="registration/**/*" />
@@ -466,7 +464,6 @@
<include name="groovybooking/**/*" />
<include name="seamdiscs/**/*" />
<include name="quartz/**/*" />
- <include name="wiki/**/*" />
<!--<include name="portal/**/*" />-->
<include name="drools/**/*" />
<include name="nestedbooking/**/*" />
16 years, 2 months
Seam SVN: r8846 - branches/Seam_2_0_FP/examples/itext/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-29 04:53:45 -0400 (Fri, 29 Aug 2008)
New Revision: 8846
Modified:
branches/Seam_2_0_FP/examples/itext/resources/WEB-INF/web.xml
Log:
JBPAPP-1115
Modified: branches/Seam_2_0_FP/examples/itext/resources/WEB-INF/web.xml
===================================================================
--- branches/Seam_2_0_FP/examples/itext/resources/WEB-INF/web.xml 2008-08-29 08:43:10 UTC (rev 8845)
+++ branches/Seam_2_0_FP/examples/itext/resources/WEB-INF/web.xml 2008-08-29 08:53:45 UTC (rev 8846)
@@ -7,22 +7,8 @@
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>emeraldTown</param-value>
- </context-param>
+ </context-param>
- <filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>
-
-
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
16 years, 2 months
Seam SVN: r8845 - branches/Seam_2_0_FP/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-08-29 04:43:10 -0400 (Fri, 29 Aug 2008)
New Revision: 8845
Modified:
branches/Seam_2_0_FP/build/common.build.xml
Log:
JBPAPP-1110 - workaround for not available ant 1.7.x
Modified: branches/Seam_2_0_FP/build/common.build.xml
===================================================================
--- branches/Seam_2_0_FP/build/common.build.xml 2008-08-28 22:03:50 UTC (rev 8844)
+++ branches/Seam_2_0_FP/build/common.build.xml 2008-08-29 08:43:10 UTC (rev 8845)
@@ -125,6 +125,8 @@
<copyDependencies id="remoting" pom="${remoting.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="ui" pom="${ui.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="gen" pom="${gen.pom}" todir="${lib.dir}" scope="compile" />
+ <!-- globmapper doesn't work with ant 1.6.5-->
+ <move file="${lib.dir}/mvel.jar" tofile="${lib.dir}/mvel14.jar"/>
<property name="copyseamdependenciesdone" value="true" />
</target>
16 years, 2 months
Seam SVN: r8844 - in trunk/src/excel/org/jboss/seam/excel: csv and 2 other directories.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2008-08-28 18:03:50 -0400 (Thu, 28 Aug 2008)
New Revision: 8844
Modified:
trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java
trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java
trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java
Log:
Merge cells for worksheet headers and footers
Modified: trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java 2008-08-28 20:49:59 UTC (rev 8843)
+++ trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java 2008-08-28 22:03:50 UTC (rev 8844)
@@ -84,13 +84,15 @@
* Places an item in the worksheet header
*
* @param item The item to add
+ * @param colspan The number of columns to span
*/
- public abstract void addWorksheetHeader(WorksheetItem item);
+ public abstract void addWorksheetHeader(WorksheetItem item, int colspan);
/**
* Places an item in the worksheet footer
*
* @param item The item to add
+ * @param colspan The number of columns to span
*/
- public abstract void addWorksheetFooter(WorksheetItem item);
+ public abstract void addWorksheetFooter(WorksheetItem item, int colspan);
}
\ No newline at end of file
Modified: trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java 2008-08-28 20:49:59 UTC (rev 8843)
+++ trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java 2008-08-28 22:03:50 UTC (rev 8844)
@@ -159,13 +159,13 @@
log.trace("executeCommand() is not supported by CSV exporter", new Object[0]);
}
- public void addWorksheetFooter(WorksheetItem item)
+ public void addWorksheetFooter(WorksheetItem item, int colspan)
{
// TODO Auto-generated method stub
}
- public void addWorksheetHeader(WorksheetItem item)
+ public void addWorksheetHeader(WorksheetItem item, int colspan)
{
// TODO Auto-generated method stub
Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-08-28 20:49:59 UTC (rev 8843)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-08-28 22:03:50 UTC (rev 8844)
@@ -681,11 +681,18 @@
* Places an item in the worksheet footer
*
* @param item The item to add
+ * @param colspan The number of columns to span
*/
- public void addWorksheetFooter(WorksheetItem item)
+ public void addWorksheetFooter(WorksheetItem item, int colspan)
{
currentColumnIndex = startColumnIndex;
currentRowIndex = maxRowIndex;
+ UIMergeCells mergeCommand = new UIMergeCells();
+ mergeCommand.setStartColumn(currentColumnIndex);
+ mergeCommand.setStartRow(currentRowIndex);
+ mergeCommand.setEndColumn(currentColumnIndex + colspan - 1);
+ mergeCommand.setEndRow(currentRowIndex);
+ executeCommand(mergeCommand);
addItem(item);
}
@@ -693,9 +700,16 @@
* Places an item in the worksheet header
*
* @param item The item to add
+ * @param colspan The number of columns to span
*/
- public void addWorksheetHeader(WorksheetItem item)
+ public void addWorksheetHeader(WorksheetItem item, int colspan)
{
+ UIMergeCells mergeCommand = new UIMergeCells();
+ mergeCommand.setStartColumn(currentColumnIndex);
+ mergeCommand.setStartRow(currentRowIndex);
+ mergeCommand.setEndColumn(currentColumnIndex + colspan - 1);
+ mergeCommand.setEndRow(currentRowIndex);
+ executeCommand(mergeCommand);
addItem(item);
startRowIndex++;
}
Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java 2008-08-28 20:49:59 UTC (rev 8843)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java 2008-08-28 22:03:50 UTC (rev 8844)
@@ -111,7 +111,8 @@
WorksheetItem headerItem = (WorksheetItem) getFacet(HEADER_FACET_NAME);
if (headerItem != null) {
- excelWorkbook.addWorksheetHeader(headerItem);
+ int colspan = getChildrenOfType(getChildren(), UIColumn.class).size();
+ excelWorkbook.addWorksheetHeader(headerItem, colspan);
}
// Add worksheet level items
@@ -140,7 +141,8 @@
WorksheetItem footerItem = (WorksheetItem) getFacet(FOOTER_FACET_NAME);
if (footerItem != null) {
- excelWorkbook.addWorksheetFooter(footerItem);
+ int colspan = getChildrenOfType(getChildren(), UIColumn.class).size();
+ excelWorkbook.addWorksheetFooter(footerItem, colspan);
}
}
16 years, 2 months
Seam SVN: r8843 - in trunk: src/excel/org/jboss/seam/excel and 4 other directories.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2008-08-28 16:49:59 -0400 (Thu, 28 Aug 2008)
New Revision: 8843
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java
trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java
trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java
trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java
trunk/src/excel/org/jboss/seam/excel/ui/UIColumn.java
trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java
trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java
Log:
Support for worksheet level headers/footers and for column data footers
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-08-28 20:49:59 UTC (rev 8843)
@@ -777,9 +777,18 @@
<itemizedlist>
<listitem>
<para>
- <literal>none</literal>
+ <literal>header</literal>—Contents that will
+ be placed at the top of the data block, above the
+ column headers (if any)
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>footer</literal>—Contents that will
+ be placed at the bottom of the data block, below the
+ column footers (if any)
+ </para>
+ </listitem>
</itemizedlist>
</entry>
</row>
@@ -902,6 +911,20 @@
that will be used as header for the column.
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>footer</literal>
+ —This facet can/will contain one
+ <literal><e:cell></literal>
+ ,
+ <literal><e:formula></literal>
+ ,
+ <literal><e:image></literal>
+ or
+ <literal><e:hyperLink></literal>
+ that will be used as footer for the column.
+ </para>
+ </listitem>
</itemizedlist>
</entry>
</row>
Modified: trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -79,4 +79,18 @@
* @param command The command to execute
*/
public abstract void executeCommand(Command command);
+
+ /**
+ * Places an item in the worksheet header
+ *
+ * @param item The item to add
+ */
+ public abstract void addWorksheetHeader(WorksheetItem item);
+
+ /**
+ * Places an item in the worksheet footer
+ *
+ * @param item The item to add
+ */
+ public abstract void addWorksheetFooter(WorksheetItem item);
}
\ No newline at end of file
Modified: trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -159,4 +159,16 @@
log.trace("executeCommand() is not supported by CSV exporter", new Object[0]);
}
+ public void addWorksheetFooter(WorksheetItem item)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addWorksheetHeader(WorksheetItem item)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
}
Modified: trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -28,6 +28,8 @@
import org.jboss.seam.excel.ui.UIColumn;
import org.jboss.seam.excel.ui.UIWorkbook;
import org.jboss.seam.excel.ui.UIWorksheet;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
/**
@@ -150,6 +152,17 @@
processOutputs(headerOutputs, "global,header");
}
+ try
+ {
+ String rendered = ExcelComponent.cmp2String(FacesContext.getCurrentInstance(), column);
+ Log log = Logging.getLog(getClass());
+ log.warn("Rendered as #0", rendered);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
// Process data
while (iterator.hasNext())
{
Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -106,6 +106,12 @@
* user-defined worksheets in the workbook.
*/
private int currentWorksheetIndex = 0;
+
+ /**
+ * The maximum row index we have seen. Used for determining where to place the
+ * worksheet footer (if any)
+ */
+ private int maxRowIndex;
// Template helper class for cell formats
private JXLTemplates templates = new JXLTemplates();
@@ -127,7 +133,7 @@
throw new ExcelWorkbookException(Interpolator.instance().interpolate("Excel only supports {0} rows", MAX_COLUMNS));
}
}
-
+
/**
* Moves the internal column pointer to the next column, called by the tag to
* indicate that a new column has been started. If the pointer exceeds the
@@ -147,6 +153,9 @@
{
throw new ExcelWorkbookException(Interpolator.instance().interpolate("Excel doesn't support more than {0} columns", MAX_COLUMNS));
}
+ if (currentRowIndex > maxRowIndex) {
+ maxRowIndex = currentRowIndex;
+ }
currentRowIndex = startRowIndex;
}
@@ -224,6 +233,7 @@
currentColumnIndex = startColumnIndex;
startRowIndex = uiWorksheet.getStartRow() == null ? 0 : uiWorksheet.getStartRow();
currentRowIndex = startRowIndex;
+ maxRowIndex = currentRowIndex;
}
/**
@@ -667,4 +677,27 @@
}
}
+ /**
+ * Places an item in the worksheet footer
+ *
+ * @param item The item to add
+ */
+ public void addWorksheetFooter(WorksheetItem item)
+ {
+ currentColumnIndex = startColumnIndex;
+ currentRowIndex = maxRowIndex;
+ addItem(item);
+ }
+
+ /**
+ * Places an item in the worksheet header
+ *
+ * @param item The item to add
+ */
+ public void addWorksheetHeader(WorksheetItem item)
+ {
+ addItem(item);
+ startRowIndex++;
+ }
+
}
Modified: trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -29,7 +29,6 @@
*/
public abstract class ExcelComponent extends UIComponentBase
{
- public final static String HEADER_FACET = "header";
private static final String DEFAULT_CONTENT_TYPE = "text/html";
private static final String DEFAULT_CHARACTER_ENCODING = "utf-8";
Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIColumn.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIColumn.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIColumn.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -16,6 +16,9 @@
{
public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIColumn";
+ private static final String HEADER_FACET_NAME = "header";
+ private static final String FOOTER_FACET_NAME = "footer";
+
private Boolean autoSize;
private Boolean hidden;
private Integer width;
@@ -74,9 +77,7 @@
@Override
public void encodeBegin(FacesContext facesContext) throws IOException
{
- /**
- * Get workbook and worksheet
- */
+ // Get workbook and worksheet
ExcelWorkbook excelWorkbook = getWorkbook(getParent());
if (excelWorkbook == null)
@@ -84,9 +85,7 @@
throw new ExcelWorkbookException("Could not find excel workbook");
}
- /**
- * Column width etc.
- */
+ // Column width etc.
excelWorkbook.applyColumnSettings(this);
UIWorksheet sheet = (UIWorksheet) getParentByClass(getParent(), UIWorksheet.class);
@@ -95,30 +94,21 @@
throw new ExcelWorkbookException("Could not find worksheet");
}
- /**
- * Add header items (if any)
- */
- // TODO: multicells
- UICell headerCell = (UICell) getFacet(HEADER_FACET);
- if (headerCell != null)
+ // Add header items (if any)
+ WorksheetItem headerItem = (WorksheetItem) getFacet(HEADER_FACET_NAME);
+ if (headerItem != null)
{
- excelWorkbook.addItem(headerCell);
+ excelWorkbook.addItem(headerItem);
}
- /**
- * Execute commands (if any)
- */
+ // Execute commands (if any)
List<Command> commands = getCommands(getChildren());
for (Command command : commands)
{
excelWorkbook.executeCommand(command);
}
- /**
- * Get UiCell template this column's data cells and iterate over sheet
- * data
- *
- */
+ // Get UiCell template this column's data cells and iterate over sheet data
for (WorksheetItem item : getItems(getChildren()))
{
Object oldValue = null;
@@ -153,9 +143,15 @@
}
}
- /**
- * Move column pointer to next column
- */
+ // Add footer items (if any)
+ WorksheetItem footerItem = (WorksheetItem) getFacet(FOOTER_FACET_NAME);
+ if (footerItem != null)
+ {
+ excelWorkbook.addItem(footerItem);
+ }
+
+
+ // Move column pointer to next column
excelWorkbook.nextColumn();
}
Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -55,8 +55,6 @@
private Boolean useTemporaryFileDuringWrite;
private Boolean workbookProtected;
- private long timing;
-
public CreationType getCreationType()
{
if (hasSettings())
@@ -289,20 +287,13 @@
@Override
public void encodeBegin(javax.faces.context.FacesContext facesContext) throws IOException
{
- timing = new Date().getTime();
- /**
- * Get workbook implementation
- */
+ // Get workbook implementation
excelWorkbook = ExcelFactory.instance().getExcelWorkbook(type);
- /**
- * Create a new workbook
- */
+ // Create a new workbook
excelWorkbook.createWorkbook(this);
- /**
- * Find global templates and push them to workbook
- */
+ // Find global templates and push them to workbook
for (Template template : getTemplates(getChildren()))
{
excelWorkbook.addTemplate(template);
@@ -314,23 +305,14 @@
public void encodeEnd(FacesContext context) throws IOException
{
- /**
- * Get the bytes from workbook that should be passed on to the user
- */
- byte[] bytes = new byte[0];
- bytes = excelWorkbook.getBytes();
- if (log.isDebugEnabled())
- {
- log.debug("Prosessed for {0}ms", new Date().getTime() - timing);
- }
+ // Get the bytes from workbook that should be passed on to the user
+ byte[] bytes = excelWorkbook.getBytes();
DocumentType type = excelWorkbook.getDocumentType();
/**
- *
* Code below is the same as for PDF generation. With a seam core document
* store (or equivalent), this might need modifications
- *
*/
String viewId = Pages.getViewId(context);
String baseName = baseNameForViewId(viewId);
Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java 2008-08-28 13:56:25 UTC (rev 8842)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java 2008-08-28 20:49:59 UTC (rev 8843)
@@ -6,6 +6,7 @@
import java.util.Iterator;
import java.util.List;
+import javax.faces.component.UIComponent;
import javax.faces.model.DataModel;
import org.jboss.seam.excel.Command;
@@ -18,6 +19,9 @@
{
public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIWorksheet";
+ private static final String HEADER_FACET_NAME = "header";
+ private static final String FOOTER_FACET_NAME = "footer";
+
private String name;
private String var;
private Object value;
@@ -94,9 +98,7 @@
@Override
public void encodeBegin(javax.faces.context.FacesContext facesContext) throws java.io.IOException
{
- /**
- * Get workbook
- */
+ // Get workbook
ExcelWorkbook excelWorkbook = getWorkbook(getParent());
if (excelWorkbook == null)
@@ -104,31 +106,44 @@
throw new ExcelWorkbookException("Could not find excel workbook");
}
- /**
- * Create new worksheet (or select an existing one) and apply settings (if
- * any)
- */
+ // Create new worksheet (or select an existing one) and apply settings (if any)
excelWorkbook.createOrSelectWorksheet(this);
- /**
- * Add worksheet level items
- */
+ WorksheetItem headerItem = (WorksheetItem) getFacet(HEADER_FACET_NAME);
+ if (headerItem != null) {
+ excelWorkbook.addWorksheetHeader(headerItem);
+ }
+
+ // Add worksheet level items
List<WorksheetItem> items = getItems(getChildren());
for (WorksheetItem item : items)
{
excelWorkbook.addItem(item);
}
- /**
- * Execute worksheet level commands
- */
+ // Execute worksheet level commands
List<Command> commands = getCommands(getChildren());
for (Command command : commands)
{
excelWorkbook.executeCommand(command);
}
}
+
+ @Override
+ public void encodeEnd(javax.faces.context.FacesContext facesContext) throws java.io.IOException
+ {
+ ExcelWorkbook excelWorkbook = getWorkbook(getParent());
+ if (excelWorkbook == null)
+ {
+ throw new ExcelWorkbookException("Could not find excel workbook");
+ }
+ WorksheetItem footerItem = (WorksheetItem) getFacet(FOOTER_FACET_NAME);
+ if (footerItem != null) {
+ excelWorkbook.addWorksheetFooter(footerItem);
+ }
+ }
+
@SuppressWarnings("unchecked")
public static Iterator unwrapIterator(Object value)
{
16 years, 2 months
Seam SVN: r8842 - in trunk/seam-gen: icefaces/build-scripts and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-08-28 09:56:25 -0400 (Thu, 28 Aug 2008)
New Revision: 8842
Modified:
trunk/seam-gen/build-scripts/build-war.xml
trunk/seam-gen/build-scripts/build.xml
trunk/seam-gen/icefaces/build-scripts/build-war.xml
trunk/seam-gen/icefaces/build-scripts/build.xml
Log:
include empty directories when cleaning test-build
Modified: trunk/seam-gen/build-scripts/build-war.xml
===================================================================
--- trunk/seam-gen/build-scripts/build-war.xml 2008-08-28 13:55:16 UTC (rev 8841)
+++ trunk/seam-gen/build-scripts/build-war.xml 2008-08-28 13:56:25 UTC (rev 8842)
@@ -257,7 +257,7 @@
<delete dir="${war.dir}"/>
<delete dir="${basedir}/test-report"/>
<delete dir="${basedir}/test-output"/>
- <delete failonerror="no">
+ <delete failonerror="no" includeemptydirs="true">
<fileset dir="${test.dir}">
<exclude name="**/*.class" if="eclipse.running"/>
</fileset>
Modified: trunk/seam-gen/build-scripts/build.xml
===================================================================
--- trunk/seam-gen/build-scripts/build.xml 2008-08-28 13:55:16 UTC (rev 8841)
+++ trunk/seam-gen/build-scripts/build.xml 2008-08-28 13:56:25 UTC (rev 8842)
@@ -229,7 +229,7 @@
<delete dir="${src.schema.dir}" failonerror="no"/>
<delete dir="${basedir}/test-report"/>
<delete dir="${basedir}/test-output"/>
- <delete failonerror="no">
+ <delete failonerror="no" includeemptydirs="true">
<fileset dir="${test.dir}">
<exclude name="**/*.class" if="eclipse.running"/>
</fileset>
Modified: trunk/seam-gen/icefaces/build-scripts/build-war.xml
===================================================================
--- trunk/seam-gen/icefaces/build-scripts/build-war.xml 2008-08-28 13:55:16 UTC (rev 8841)
+++ trunk/seam-gen/icefaces/build-scripts/build-war.xml 2008-08-28 13:56:25 UTC (rev 8842)
@@ -257,7 +257,7 @@
<delete dir="${war.dir}"/>
<delete dir="${basedir}/test-report"/>
<delete dir="${basedir}/test-output"/>
- <delete failonerror="no">
+ <delete failonerror="no" includeemptydirs="true">
<fileset dir="${test.dir}">
<exclude name="**/*.class" if="eclipse.running"/>
</fileset>
Modified: trunk/seam-gen/icefaces/build-scripts/build.xml
===================================================================
--- trunk/seam-gen/icefaces/build-scripts/build.xml 2008-08-28 13:55:16 UTC (rev 8841)
+++ trunk/seam-gen/icefaces/build-scripts/build.xml 2008-08-28 13:56:25 UTC (rev 8842)
@@ -229,7 +229,7 @@
<delete dir="${src.schema.dir}" failonerror="no"/>
<delete dir="${basedir}/test-report"/>
<delete dir="${basedir}/test-output"/>
- <delete failonerror="no">
+ <delete failonerror="no" includeemptydirs="true">
<fileset dir="${test.dir}">
<exclude name="**/*.class" if="eclipse.running"/>
</fileset>
16 years, 2 months