Can't skip some components during export

Community Driven Extensions Project
Post Reply
trongtb1988
Posts: 2
Joined: 13 Oct 2015, 09:17

13 Oct 2015, 09:26

Hi All!

I am working on primefaces 5.2, primefaces extention 3.2.0. I have 1 datatable and have facet header Inside datatable like this

Code: Select all

 f:facet name="header">
<p:commandButton style="float:left" actionListener="#{lotEditor.refresh}" id="refreshId" icon = "fa fa-refresh fa-2x" update="@form" title="Refresh" >
</p:commandButton>						 		
<p:commandButton value="Monitor Selected Lots" style="float:left" type="button"
								action="#{lotEditor.monitorSelectedLots}" id="monBtn" />
<p:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="fa fa-table" />
	<p:columnToggler datasource="lotBrowserTable" trigger="toggler">
								<p:ajax event="toggle" listener="#{lotExtensionsBrowser.onToggle}" />
	</p:columnToggler>
	<h:commandLink style="float:right;">
								<i class="fa fa-file-excel-o fa-2x"></i>
<pe:exporter type="xlsx" target="lotBrowserTable" fileName="lotBrowsers"  
              facetBackground="#F88017" facetFontSize="10" facetFontColor="#0000ff" facetFontStyle="BOLD"  fontName="Courier New"                 						 cellFontColor="#00ff00" cellFontSize="8" cellFontStyle="NORMAL" skipComponents="org.primefaces.component.commandlink.CommandLink,org.primefaces.component.commandbutton.CommandButton, org.primefaces.component.columntoggler.ColumnToggler" />[/
				                 
	</h:commandLink>
				         </f:facet>

when I export to excel file using

Code: Select all

 <pe:exporter type="xlsx" target="lotBrowserTable" fileName="lotBrowsers"  
              facetBackground="#F88017" facetFontSize="10" facetFontColor="#0000ff" facetFontStyle="BOLD"  fontName="Courier New"                 						 cellFontColor="#00ff00" cellFontSize="8" cellFontStyle="NORMAL" skipComponents="org.primefaces.component.commandlink.CommandLink,org.primefaces.component.commandbutton.CommandButton, org.primefaces.component.columntoggler.ColumnToggler" />
The exported excel file include the value Monitor Selected Lots, and Columns. I can't skip this components

Thank you so much!

rosière
Posts: 75
Joined: 28 Nov 2012, 15:55
Contact:

20 Nov 2015, 10:45

I did not see your datatable element in your code. Why don't you show it?

I think it is important to apply an appopriate layout of components in a page in order to export data.

Also, you may set a column's exportable attribute to false in order to exclude it.

Here is my example of pe:exporter that works:

Code: Select all

 <ui:define name="body">
<p:dataTable ... id="table_billing" ..>
***
</p:dataTable>

 <h:commandLink>  
                <p:graphicImage title="xls" value="****" />
                <pe:exporter type="xls" target="table_billing" fileName="codes" preProcessor="***" transient="true"/>  
            </h:commandLink>
</ui:define>

JDK: 1.8
Operating system: Windows 7 Professional
server: payara 4.1.1
IDE: NetBeans 8.1
primefaces : version 5.2.5
primefaces extensions : 6.0.0

Armstrong
Posts: 1
Joined: 21 May 2016, 07:43

21 May 2016, 07:46

By abacus a comment, you acquire our IBM Knowledge Center Terms of Use. Your comments entered on this IBM Knowledge Center website do not represent the angle or opinions of IBM. IBM, in its sole discretion, affluence the appropriate to abolish any comments from this site. IBM is not amenable for, and does not validate or confirm, the definiteness or accurateness of any comments you post. IBM does not endorse any of your comments. All IBM comments are provided "AS IS" and are not acceptable by IBM in any way.

next801
Posts: 5
Joined: 27 Jan 2017, 20:57

27 Jan 2017, 21:03

I'm new and I'm interested in this topic. Thank you!

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests