Hi,
I see an example for exporting grid data to CSV (EXCEL) file. But I don't see the corresponding example for backing bean code. Can someone provides that? Thanks.
Hello,
I use this code, but I would like a' ; ' for seprator in my csv file but the grid export put ' , ' how can I do that ?
Moreover I would like to export all the data source and not only displayed datas in the current page, is it possible ?
Thanks in advance
Victor
Hi Yzbythesea,
The following code sample shows how to export your current page:
JSP
<h:commandButton value="Download" actionListener="#{exportGrid.csvDownload}" />
Java
public void csvDownload(ActionEvent event){getGrid().export(DataToExport.CURRENT, ExportFormat.CSV); FacesContext context = FacesContext.getCurrentInstance();context.responseComplete();}
For more examples, please take a look at the following website NetAdvantage for JSF
Regards,
Pamela