Olá, alguém poderia me sugerir algum componente de renderização de tabelas baseado em JSF que possua recursos de exportação de dados semelhantes àqueles encontrados na biblioteca displaytag (http://displaytag.sourceforge.net)?
JSF: Sugestão de componentes de renderização de tabelas e exportação de dados para o formato Excel
8 Respostas
Opa, em relação a exportação para Excel procure por jxl.jar!
E este jxl.jar faz parte de que projeto?
Procurei por um projeto chamado JXL, mas não diz nada referente a exportação de dados para o formato Excel.
(Link que encontrei: http://jxl.sourceforge.net/
Já ouviu falar nessa api?
http://jexcelapi.sourceforge.net
Eu particularmente gosto bastante. Simples de usar, possui vários recursos e gera xml muito rapidamente.
mas ai eh mto precaria…
o displaytag eh bem melhor,
se eu pegar os resultados de um Managed Beans, sera que a pagina jsf vai funcionar ?
:?: :?: :?:
é exatamente isso que estou tentando fazer nesse momento, pegar o valor de um managed-bean
e lista-lá com displaytag, isso é possivel estou tentando aqui mas sem muito sucesso…
c alguem ai souber help !!
Nunca utilizei mas acho q é isso q vc ta querendo:
http://myfaces.apache.org/sandbox/excelexport.html
[]´s
Humberto Lima
Onde faço download desse componente?
Já achei o jar do componente Sandbox, porém, não consigo fazer funcionar.
Analisei um tam de pom.xml que vem no pacote, e encontrei algumas informações interessantes:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>tomahawk-sandbox</artifactId>
<packaging>jar</packaging>
<name>Sandbox Core</name>
<url>http://myfaces.apache.org/sandbox</url>
<description>
This is the Sandbox Subproject Description [INSERT MORE STUFF HERE]
</description>
<parent>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>sandbox-project</artifactId>
<version>1.1.7-SNAPSHOT</version>
</parent>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/core</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/core</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/myfaces/tomahawk/trunk/sandbox/core</url>
</scm>
<repositories>
<repository>
<id>java-net</id>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
</repository>
</repositories>
<dependencies>
<!-- compile -->
<dependency>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>tomahawk</artifactId>
<version>${version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>portlet-api</groupId>
<artifactId>portlet-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>poi</groupId>
<artifactId>poi</artifactId>
<version>2.5.1-final-20040804</version>
<scope>compile</scope>
</dependency>
<!-- provided dependencies -->
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- Needed for JSF1.2 compatibility hacks -->
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.10</version>
<scope>compile</scope>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.shale</groupId>
<artifactId>shale-test</artifactId>
<version>1.0.3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.apache.myfaces</groupId>
<artifactId>myfaces-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.myfaces</groupId>
<artifactId>myfaces-impl</artifactId>
</exclusion>
<exclusion>
<groupId>myfaces</groupId>
<artifactId>myfaces-api</artifactId>
</exclusion>
<exclusion>
<groupId>myfaces</groupId>
<artifactId>myfaces-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/resources-facesconfig</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xslt-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
<srcIncludes>**/*.tld</srcIncludes>
<srcDir>src/main/tld</srcDir>
<destDir>target/classes/META-INF</destDir>
</configuration>
<executions>
<execution>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>changelog-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<reportSets>
<reportSet>
<id>dual-report</id>
<configuration>
<type>range</type>
<range>30</range>
</configuration>
<reports>
<report>changelog</report>
<report>file-activity</report>
<report>dev-activity</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>generate-site</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xslt-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>generate-tld-for-tlddoc</id>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile>
<srcIncludes>**/*.tld</srcIncludes>
<srcDir>src/main/tld</srcDir>
<destDir>target/tlddoc-site</destDir>
</configuration>
</execution>
<execution>
<id>generate-tld-for-jar</id>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
<srcIncludes>**/*.tld</srcIncludes>
<srcDir>src/main/tld</srcDir>
<destDir>target/classes/META-INF</destDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>net.sourceforge.maven-taglib</groupId>
<artifactId>maven-taglib-plugin</artifactId>
<configuration>
<taglib.src.dir>${basedir}/target/tlddoc-site</taglib.src.dir>
<tldDocDir>${basedir}/target/site/tlddoc</tldDocDir>
</configuration>
</plugin>
</plugins>
</reporting>
</profile>
<profile>
<id>generate-assembly</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xslt-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>generate-tld-for-tlddoc</id>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile>
<srcIncludes>**/*.tld</srcIncludes>
<srcDir>src/main/tld</srcDir>
<destDir>target/tlddoc-site</destDir>
</configuration>
</execution>
<execution>
<id>generate-tld-for-jar</id>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
<srcIncludes>**/*.tld</srcIncludes>
<srcDir>src/main/tld</srcDir>
<destDir>target/classes/META-INF</destDir>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-javadoc</id>
<goals><goal>jar</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.sourceforge.maven-taglib</groupId>
<artifactId>maven-taglib-plugin</artifactId>
<configuration>
<taglib.src.dir>${basedir}/target/tlddoc-site</taglib.src.dir>
<tldDocDir>${basedir}/target/tlddoc</tldDocDir>
</configuration>
<executions>
<execution>
<id>attach-javadoc</id>
<goals><goal>taglibdocjar</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Alguém tem know-how nisso?