-
1. Re: a4j:commandButton and Apache POI
ilya40umov Dec 29, 2010 2:00 AM (in response to cobar)1 of 1 people found this helpfulI'm afraid this is not possible. Because when you use h:commandButton you send some specital headers with response and that's why browser opens your resonse as a workbook in Excel. But you can't possibly open a workbook inside your html page. I think you have only one option you should use some JS components which look like Excel. See http://www.treegrid.com/treegrid/www/ for example. I'm sorry if I disappointed you.
P.S. May be folks have other opinions.
-
2. Re: a4j:commandButton and Apache POI
ilya_shaikovsky Jan 3, 2011 10:53 AM (in response to cobar)Ilya is right, you can't use ajax controls to initiate downloads, excel's PDF's and so on passing to client. So you have to use h:commandButton and probably trigger some indication using its onclick.
-
3. Re: a4j:commandButton and Apache POI
cobar Jan 3, 2011 12:56 PM (in response to ilya_shaikovsky)Many thanks for looking at this! I travelled down the alternate road by triggering a modal panel using an a4j:support because the h:commandButton does not support oncomplete. The problem is the response never triggers the oncomplete, probably because the export action forced the reponse complete. The best solution I came up with is to allow the user to close the modal panel manually which means they can start firing other events before the export is complete which is what I was hoping to prevent. Que sera sera
Thanks for the help.