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
The ClassCastException you are getting is often caused by version mis-matches. However it may be caused by stuff inside a4f - I can't tell from what you've posted.
NetAdvantage is completely compatible with JSF base components. Between the h, f and ig libraries, we don't generally find that JSF developers need anything else. If you'd like to discuss your application's needs I'd be happy to do that with you!
Thanks,Jim
Hi Jim,
Thanks for reply. I have seen If I navigate the page through faces-config navigation rule, and put a h:commadButton or ig:link with out mentioning amy smartRefreshId then same code working prefectly.
But thing is that in that case full page submit is happening.
Now I am describing my senario as per project requirement.
This is my requirement. Can you please help me on this ? currently if i want to do like that , those exception i am getting as i have mentioned.
with warm regards,
gantait
Gantait:
It sounds like you should use NetAdvantage's WebDialog instead of window.open. Based on what I've read here, this ought to solve your issues. There are several examples of working with the dialog over at componentsforjsf.com. Culd you take a little time to review them and see if they'll help?
One of the nice things about the webdialog is that it really exists as a DIV inside you're main page: from JSF's perspective its part of the same page, but from the user's perspective it's a "separate" popup. This gets you the look you want, but keeps the page structure in a format that standard JSF is comfortable with.
hope I'm being clear...if the sames don't make sense, post back here, and we'll continue working on this.
Thanks Jim for reply.
See all the pages(more than 100 , opening by tree node click) that i am opening through window.open shoud must have separate separate manage-bean. All could not be inside a single page. From those page i can create a record save it, then after close the bean instance also i have to make null. And i can open multiple pages at a time.And those pages sometimes can be modal and sometimes will be non modal.
And lots of script running behind each page ..for onload, onkeydown, winclose.So depending upon the requirement i can't use WebDialog...
Okay, well, I certainly understand that you are dealing with a complex application. I'm not sure I see that the dialog window wouldn't work for you - I think it would be a good solution, but its difficult to work through all the details here in the forum. Infragistics has consultants who deal with these sorts of things all the time - that might be a better way to get to the solution you looking for.
Best, Jim