Hi, In my application i need the feature grid data export in CSV file.
NetAdvantage , has provide this feature, but using h:commandButton,
Is this possible without using h:commandButton, instade of that i want to use ig:link
as asper the requirement i can't resfresh my page.
To generate and get the csv file , we need to setup the Resonse stream header
Content-Disposition", "attachment; filename=data.csv"
this i can do by coding itself, but is netAdvantage giving us the fexibility to do this by ajax mode? or it also use the same ?
I think it is very required to have the ajax support for this also.
Anybody plz help how can i proceed.
Hello,
I think the exporting can also be done using the ig:link in the same way as h:commandButton. You only need to place your exporting code in the actionListener of the ig:Link with ajax based refresh for the GridView using smartRefreshIds attribute of the link.
Is it not working?
Thank you
By using ig:link it is possible if we don't give any smartRefreshIds
Means if we submit the whole page, in my case i can't do that. And another problem is i am not refering my page by faces-config navigation rule. I am opening jsf page by js window.open
as actually its like popup page, something like window MDI application.
Application is something like that. first login page, the going to main page, from there by clicking links opening different pages, and main page will be still opened .
I am using a4j ,richfaces component also.
And when i want to implement this in those pages it showing,
at com.infragistics.faces.grid.component.GridView.getDataToExport(
GridView.java:508
And
java.lang.IllegalStateException
: Servlet response already use stream, Writer not possible
at org.ajax4jsf.webapp.FilterServletResponseWrapper.getWriter(
FilterServletResponseWrapper.java:226)
I can't change my application architecure means have to open page like this.
So is there any solution in this senario???
Plz suggest .Thnx