You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ca...@apache.org on 2006/10/12 13:19:21 UTC

svn commit: r463200 - in /myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp: excelExport.jsp home.jsp

Author: cagatay
Date: Thu Oct 12 04:19:20 2006
New Revision: 463200

URL: http://svn.apache.org/viewvc?view=rev&rev=463200
Log:
Add jsp for the excel export example

Added:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/excelExport.jsp   (with props)
Modified:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp

Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/excelExport.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/excelExport.jsp?view=auto&rev=463200
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/excelExport.jsp (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/excelExport.jsp Thu Oct 12 04:19:20 2006
@@ -0,0 +1,83 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+<html>
+
+<!--
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<%@include file="inc/head.inc" %>
+
+<body>
+
+<f:view>
+
+    <h:form>
+    	<p>This component allows to export the datatable contents to an excel file.</p>
+		<p>Note: Currently the component does not support client side state saving.</p>
+		
+		<br>
+		
+		<t:dataTable id="tbl_cars"
+                styleClass="scrollerTable"
+                headerClass="standardTable_Header"
+                footerClass="standardTable_Header"
+                rowClasses="standardTable_Row1,standardTable_Row2"
+                columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
+                var="car"
+                value="#{excelExportBean.carsList}"
+                preserveDataModel="false" 
+           >
+           <h:column>
+               <f:facet name="header">
+                   <h:outputText value="Id" />
+               </f:facet>
+               <h:outputText value="#{car.id}" />
+           </h:column>
+
+           <h:column>
+               <f:facet name="header">
+                  <h:outputText value="Type" />
+               </f:facet>
+               <h:outputText value="#{car.type}" />
+           </h:column>
+
+           <h:column>
+               <f:facet name="header">
+                  <h:outputText value="Color" />
+               </f:facet>
+               <h:outputText value="#{car.color}" />
+           </h:column>
+
+        </t:dataTable>
+
+		<br>
+		
+		<s:excelExport for="tbl_cars">
+			<h:commandButton action="" value="Export"/>
+		</s:excelExport>
+    </h:form>
+</f:view>
+
+<%@include file="inc/page_footer.jsp" %>
+
+</body>
+
+</html>

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/excelExport.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp?view=diff&rev=463200&r1=463199&r2=463200
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp Thu Oct 12 04:19:20 2006
@@ -73,6 +73,7 @@
             <h:panelGrid style="padding-left:25px">
             	<h:outputLink value="autoUpdateDataTable.jsf" ><f:verbatim>Automatically updated dataTable per AJAX</f:verbatim></h:outputLink>
             	<h:outputLink value="selectOneRow.jsf"><f:verbatim>selectOneRow - a DataTable Enhancement</f:verbatim></h:outputLink>
+            	<h:outputLink value="excelExport.jsf"><f:verbatim>ExcelExport - Export datatable contents as an excel file</f:verbatim></h:outputLink>
             </h:panelGrid>
 
             <h:outputText value="Selection Lists"/>