Coder Social home page Coder Social logo

jsfexporter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsfexporter's Issues

Add export custom list when richface lazy loading

Add possibility to export a full list when custom lazy load is available. We have implemented a custom lazy load. Is it possible to add a new parameter to add the full list as parameter to export.

Datatable too big?

hello,

at first I would like to thank you for your work, the jsf exporter is great!

It works fine for me, but now I have a datatable with around 65k entries and the creation of the file isn't executed. Is there a limit for data which the exporter can handle?

Support depth indicator on p:treeTable

It would be handy to have TreeTableExportSource optionally do something to indicate depth for flat formats like PDF/CSV/Excel. Maybe a config option to add an additional depth column to the export, or prepend spaces/tabs to the value of the first cell in each row.

Richfaces 4.5.0.Final

In order to make this exporter works whith RichFaces 4.5.0.Final, I had to exclude RichFaces dependencies. Like this :

        <dependency>
            <groupId>com.lapis.jsfexporter</groupId>
            <artifactId>export-source-richfaces</artifactId>
            <version>1.0.2.Final</version>
            <exclusions>
                <exclusion>
                    <artifactId>richfaces-components-ui</artifactId>
                    <groupId>org.richfaces.ui</groupId>
                </exclusion>
            </exclusions>
        </dependency>

It could be a good idea to mark the dependency as provided. I think there is the same problem with primefaces...

Add support for composite components

Currently these show up as javax.faces.component.UINamingContainer in exported file. Would also appreciate any pointers on how to implement this on my own

IndexOutOfBoundsException: Index: 1, Size: 1 at exportFacet

Happens after clicking the dataExporter

Loaded JARs:

  1. jsf-exporter-core-1.0.2.Final
  2. easymock-2.2
  3. hamcrest-core-1.1
  4. jmock-1.1.0
  5. omnifaces-1.7
  6. export-source-primefaces-1.0.2.Final
  7. export-type-csv-1.0.2.Final
  8. export-type-excel-1.0.2.Final
  9. export-type-pdf-1.0.2.Final
  10. export-type-xml-1.0.2.Final
  11. jdom2-2.0.5
  12. poi-ooxml-3.9-20121203
  13. xmlbeans-2.3.0

Stacktrace:
2015-03-18 11:16:09,091 ERROR [io.undertow.request](default task-61) UT005023: Exception handling request to /shelfboard/dashboard/gerencial.xhtml: javax.servlet.ServletException: Index: 1, Size: 1
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:72) [primefaces-5.1.jar:5.1]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3]
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3]
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.3.jar:1.2.3]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_05]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_05]

Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:638) [rt.jar:1.8.0_05]
at java.util.ArrayList.set(ArrayList.java:429) [rt.jar:1.8.0_05]
at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportFacet(DataTableExportSource.java:159) [export-source-primefaces-1.0.2.Final.jar:]
at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportData(DataTableExportSource.java:77) [export-source-primefaces-1.0.2.Final.jar:]
at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportData(DataTableExportSource.java:45) [export-source-primefaces-1.0.2.Final.jar:]
at com.lapis.jsfexporter.DataExporter.internalProcessAction(DataExporter.java:147) [jsf-exporter-core-1.0.2.Final.jar:]
at com.lapis.jsfexporter.DataExporter.processAction(DataExporter.java:101) [jsf-exporter-core-1.0.2.Final.jar:]
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:813) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
at javax.faces.component.UICommand.broadcast(UICommand.java:300) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.2.8-jbossorg-1.jar:]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.8-jbossorg-1.jar:]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) [jsf-impl-2.2.8-jbossorg-1.jar:]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
... 45 more

problem exrpoting p:TreeTable with inside p:columns

Hello ,

i'm succesfully using lapis.jsfexporter, im'using primefaces 6.2 with sping boot.
I have a problem whitih one pages, beside a snipped of code

<p:treeTable id="i" widgetVar="i" value="#{iHV.selectDates)}" 
	var="node" 
	rendered="#{iHV.selectIndicator != null}" 
	paginator="false"
	resizableColumns="true"
	paginatorPosition="top" >
	<f:facet name="header">
		<p:commandLink ajax="false">  
			<p:graphicImage value="/images/excel.png" height="20"/>
			<l:dataExporter source="i" fileType="excel" fileName="documents"/>
		</p:commandLink>
	</f:facet>	  
	<p:column headerText="Description" style="width:300px">
		<h:outputText value="#{node[1]}" title="#{node[1]}"/>
	</p:column>  
	<p:columns value="#{iHV.inValDates}" var="c" columnIndexVar="colIndex">
		<f:facet name="header">
			<h:outputText value="#{c}" />
		</f:facet>
		<h:outputText value="#{iHV.getValue(node[0],c)}">
			<f:convertNumber pattern="#,###,##0.0000" />
		</h:outputText>
	</p:columns>
</p:treeTable>

The problem is jsfexportewr do not manage p:columns but only p:column!!!!

May you extends implementation?.

Thanks in advance

Partial last page is wrong with lazy p:dataTable and p:dataList

When:
exporting from a lazy p:dataTable or p:dataList AND
table is paginated AND
exporting entire dataset AND
dataset size is not a multiple of page size

the final page is a "partial" page and is not exported correctly due to missing calls to setFirst() and loadLazyData(). Instead of exporting the data on the last page, the data on the second to last page is repeated.

Support for p:tree

Has many of the same issues as treeTable, including

  • max depth/visible only/selection only options
  • depth indicator for flat export types

Whether the tree is horizontal should probably be ignored. I can't think of any good way to support exporting a tree horizontally.

Support exporting multiple components in same file

This could be complicated. It's unclear what it means for some export types, like CSV. Possibly CSV could just add a blank line between component exports, or it could generate a bunch of CSV files and package them all into an archive (but then what format should the archive be in?).

javax.el.PropertyNotFoundException when using statics helper methods to output values

Hi

jsfexporter looks very interesting but we didn't get very far.

We use statics to do some formatting. So in the datatable:

<p:column headerText="Start Time" exportable="true>
  <h:outputText value="#{uiUtils.formatTimeFromLocalDateTime(slot.startDate,currentLocale)}" />
</p:column>

The static itself is along the lines of:

public static String formatTimeFromLocalDateTime(LocalDateTime dt, Locale locale)
{
 // do the formatting
}

But jsfexport gave the following stack trace.

16:56:13,794 ERROR [com.myapp.ui.utils.ExceptionManager] (http-localhost/127.0.0.1:8080-3) An unexpected exception has been thrown: javax.el.PropertyNotFoundException: /webapp/myfile.xhtml @71,106 value="#{uiUtils.formatDateFromLocalDateTime(_booking.startDate,currentLocale)}": The class 'com.myapp.ui.utils.UIUtils' does not have the property 'formatDateFromLocalDateTime'.
    at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) [jsf-impl-2.1.28.redhat-3.jar:2.1.28.redhat-3]
    at com.lapis.jsfexporter.impl.value.ValueHolderFormatter.formatValue(ValueHolderFormatter.java:59) [jsf-exporter-core-1.0.3.Final.jar:]
    at com.lapis.jsfexporter.impl.value.ValueHolderFormatter.formatValue(ValueHolderFormatter.java:31) [jsf-exporter-core-1.0.3.Final.jar:]
    at com.lapis.jsfexporter.util.ExportUtil.transformComponentsToString(ExportUtil.java:41) [jsf-exporter-core-1.0.3.Final.jar:]
    at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportRowCells(DataTableExportSource.java:189) [export-source-primefaces-1.0.3.Final.jar:]
    at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportData(DataTableExportSource.java:79) [export-source-primefaces-1.0.3.Final.jar:]
    at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportData(DataTableExportSource.java:45) [export-source-primefaces-1.0.3.Final.jar:]
    at com.lapis.jsfexporter.DataExporter.internalProcessAction(DataExporter.java:147) [jsf-exporter-core-1.0.3.Final.jar:]
    at com.lapis.jsfexporter.DataExporter.processAction(DataExporter.java:101) [jsf-exporter-core-1.0.3.Final.jar:]

Question: Primefaces 4 + jsfexportercore 1.0.2

i'm having this error: Could not find an IExportSource implementation for export source org.primefaces.component.treetable.TreeTable

p :treeTable value="#{estruturaProdutoMB.root}"
var="document"
id="arvore"
selection="#{estruturaProdutoMB.selectedNode}"
emptyMessage="Nenhum registro encontrado"
selectionMode="single">.../p:treeTable>

p:commandButton value="Export"
ajax="false">
<l:dataExporter source="arvore"
fileType="excel" fileName="myfile"/>
/p:commandButton>

What i'm doing wrong ?

Mojarra 2.2.6 and Liferay 6.2 CE GA1 problem

When I try to use jsfexporter in a existing Liferay portlet, I get the following error:

javax.faces.component.UIViewRoot cannot be cast to javax.portlet.faces.component.PortletNamingContainerUIViewRoot

I got the error after I added these dependencies to the portlet:

    <dependency>
        <groupId>com.lapis.jsfexporter</groupId>
        <artifactId>jsf-exporter-core</artifactId>
        <version>1.0.2.Final</version>
    </dependency>
   <dependency>
        <groupId>com.lapis.jsfexporter</groupId>
        <artifactId>export-type-excel</artifactId>
        <version>1.0.2.Final</version>
    </dependency>

Support p:rowExpansion in p:dataTable

This is complicated.

Row expansions could just be made as additional rows in the export, but this could result in some useless exports. Suppose the export type is CSV and we have a dataTable with a rowExpansion that has another dataTable inside it: the resulting CSV will be completely useless since it will have headers in the data, probably a varying number of columns, and varying meanings of data within the same column. The best solution is probably to add a configuration option that allows the user to decide if they want the rowExpansion organized into additional columns or not. If yes, then instead of having DataTableExportSource produce rows like this:

header1, header2, header3
row1_cell1, row1_cell2, row1_cell3
row_expansion_header1, row_expansion_header2
row_expansion_row1_cell1, row_expansion_row1_cell2

we would instead produce rows like this:
header1, header2, header3, row_expansion_header1, row_expansion_header2
row1_cell1, row1_cell2, row1_cell3, ,
, , , row_expansion_row1_cell1, row_expansion_row1_cell2

We should also provide an option to disable exporting the row expansion entirely.

PostProcess CSV Export

Hi,

I tried to use your lib for customizing my CSV Export. I need to remove the 'footerText' that is displayed in Primefaces p:dataTable. I could not find any documentation for writing such a Postprocessor.
Can you give me a hint how to realize this task?

P.S: I tried to find any mail address to write to but I did not find anything, sorry for using the Issue tool.

greetz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.