[seam-commits] Seam SVN: r8722 - in trunk/examples/excel: view and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Aug 18 03:50:07 EDT 2008


Author: nickarls
Date: 2008-08-18 03:50:07 -0400 (Mon, 18 Aug 2008)
New Revision: 8722

Modified:
   trunk/examples/excel/resources/WEB-INF/components.xml
   trunk/examples/excel/view/home.xhtml
Log:
Fixed components.xml unable to register new implementations in example, fixed usage of excelExporter in commandLink

Modified: trunk/examples/excel/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/excel/resources/WEB-INF/components.xml	2008-08-18 07:47:37 UTC (rev 8721)
+++ trunk/examples/excel/resources/WEB-INF/components.xml	2008-08-18 07:50:07 UTC (rev 8722)
@@ -1,18 +1,24 @@
-<components xmlns="http://jboss.com/products/seam/components" xmlns:excel="http://jboss.com/products/seam/excel"
-	xmlns:core="http://jboss.com/products/seam/core" xmlns:framework="http://jboss.com/products/seam/framework"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd 
+<components xmlns="http://jboss.com/products/seam/components"
+   xmlns:excel="http://jboss.com/products/seam/excel"
+   xmlns:core="http://jboss.com/products/seam/core"
+   xmlns:framework="http://jboss.com/products/seam/framework"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd 
                                 http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.1.xsd
                                 http://jboss.com/products/seam/excel http://jboss.com/products/seam/excel-2.1.xsd   
                                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">
 
 
-	<core:init debug="true" jndi-pattern="@jndiPattern@" />
-
-	<excel:excelFactory>
-		<property name="implementations">
-			<key>jxl</key><value>org.jboss.seam.excel.jxl.JXLExcelWorkbook</value>
-		</property>
-	</excel:excelFactory>
-
-</components>
+   <core:init debug="true" jndi-pattern="@jndiPattern@" />
+
+   <import>org.jboss.seam.excel.exporter</import>
+
+   <!-- 
+      <excel:excelFactory>
+        <property name="implementations">
+            <key>poi</key><value>org.jboss.seam.excel.poi.POIExcelWorkbook</value>
+        </property>
+      </excel:excelFactory>
+   -->
+
+</components>

Modified: trunk/examples/excel/view/home.xhtml
===================================================================
--- trunk/examples/excel/view/home.xhtml	2008-08-18 07:47:37 UTC (rev 8721)
+++ trunk/examples/excel/view/home.xhtml	2008-08-18 07:50:07 UTC (rev 8722)
@@ -1,52 +1,59 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core" xmlns:e="http://jboss.com/products/seam/excel"
-	xmlns:s="http://jboss.com/products/seam/taglib" xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Microsoft&#174; Excel&#174; Export examples</title>
-<link href="css/screen.css" rel="stylesheet" type="text/css" />
-</head>
-<body id="excelHome">
-<f:view>
-
-	<h:outputText value="Microsoft&#174; Excel&#174; Export examples" style="header"></h:outputText>
-	<br />
-	<br />
-
-	<h:outputLink value="jxl.seam">
-		<h:outputText>Export as Excel&#174; spreadsheet</h:outputText>
-	</h:outputLink>
-	<br />
-
-	<h:outputLink value="jxl.seam">
-		<h:outputText>Export as comma separated file</h:outputText>
-	</h:outputLink>
-	<br />
-	<br />
-
-	<h:form id="excelExport">
-		<a4j:commandButton value="Search" reRender="searchResults" action="#{excelTest.search}" />
-		<a4j:commandButton value="Clear" reRender="searchResults" action="#{excelTest.clear}" />
-
-
-		<a4j:outputPanel id="searchResults">
-
-			<rich:dataTable value="#{excelTest.result}" var="person" id="excelTable" columnClasses="left, right">
-				<rich:column>
-					<f:facet name="header">Name</f:facet>
-					<h:outputText value="#{person.name} #{person.lastName}"></h:outputText>
-				</rich:column>
-				<rich:column>
-					<f:facet name="header">Age</f:facet>
-					<h:outputText value="#{person.age}"></h:outputText>
-				</rich:column>
-			</rich:dataTable>
-			<h:commandLink value="Export table" action="#{excelExporter.export('excelExport:excelTable')}" />
-
-		</a4j:outputPanel>
-	</h:form>
-
-</f:view>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:e="http://jboss.com/products/seam/excel"
+	xmlns:s="http://jboss.com/products/seam/taglib"
+	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+			<title>Microsoft&#174; Excel&#174; Export examples</title>
+			<link href="css/screen.css" rel="stylesheet" type="text/css" />
+	</head>
+	<body id="excelHome">
+		<f:view>
+
+			<h:outputText value="Microsoft&#174; Excel&#174; Export examples"
+					style="header"></h:outputText>
+			<br />
+			<br />
+	
+			<h:outputLink value="jxl.seam">
+				<h:outputText>Export as Excel&#174; spreadsheet</h:outputText>
+			</h:outputLink>
+			<br />
+
+			<h:outputLink value="jxl.seam">
+				<h:outputText>Export as comma separated file</h:outputText>
+			</h:outputLink>
+			<br />
+			<br />
+
+			<h:form id="excelExport">
+				<a4j:commandButton value="Search" reRender="searchResults"
+					action="#{excelTest.search}" />
+				<a4j:commandButton value="Clear" reRender="searchResults"
+					action="#{excelTest.clear}" />
+
+				<a4j:outputPanel id="searchResults">
+					<rich:dataTable value="#{excelTest.result}" var="person"
+						id="excelTable" columnClasses="left, right">
+						<rich:column>
+							<f:facet name="header">Name</f:facet>
+							<h:outputText value="#{person.name} #{person.lastName}"/>
+						</rich:column>
+						<rich:column>
+							<f:facet name="header">Age</f:facet>
+							<h:outputText value="#{person.age}"/>
+						</rich:column>
+					</rich:dataTable>
+					<h:commandLink value="Export table"
+						action="#{excelExporter.export('excelExport:excelTable')}" />
+				</a4j:outputPanel>
+			</h:form>
+		</f:view>
+	</body>
+</html>
+




More information about the seam-commits mailing list