Call a javascript function on pe:exporter oncomplete

Community Driven Extensions Project
Post Reply
jmanuel1609
Posts: 1
Joined: 06 Oct 2015, 20:23

12 Jan 2016, 06:04

I am trying to hide a primeface block when the exporter process finish. I can not remove ajax=false because I did't have my report. I try to call a javascript function on the server by requestContex but doesn't work
this is my code
<p:commandLink ajax="false" style="float:right" id="excelSubmissionLinkId" onstart="PF('oneBlock').show()" oncomplete="PF('oneBlock').hide()" process="@none" immediate="true"
update="@none">
<p:graphicImage url="/images/excel.png" width="24" />
<pe:exporter type="xlsx" target="submissionHistoryTableId" fileName="SubmissionHistory-excel" datasetPadding="4"
facetBackground="#{mediaDetailBean.backgroundColor}" postProcessor="#{submissionsHistoryBean.postProcessExcel}" />
</p:commandLink>


Any ideas?
Thanks

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

15 Jan 2016, 17:04

You can't use ajax request with exporter because it works with non-ajax only.Look at the below thread to notify complete behavior http://www.javacodegeeks.com/2013/07/mo ... ified.html
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests