I am having trouble downloading non static files from a portletized(with ADFPortletBridge) ADF application running as a portlet producer in Webcenter spaces .
This is my scenario :
Jdev : 126.96.36.199
Webcenter : 11.1.1
The ADF app has a query page, that uses the af:query component to do a query and display results on a table. This table data need to be exported as a file with some changes like splitting address to component city and state columns .
The ADF app makes use of af:filedownloadlistener to get this(HTML formatted file with an .xls ext is our current preference to get it to open in excel, but could be anything) done . The ADF app works just fine, but as section 188.8.131.52 in the web center dev guide points out http://download.oracle.com/docs/cd/E14571_01/webcenter.1111/e10148/jpsdg_bridge.htm#CACBHDEF
> The <af.fileDownloadActionListener> component is not supported.
The actual behavior however is that the export happens when triggered, but the component keep serving up the same file it created the first time it got invoked every subsequent time.
The alternatives I've considered so far are :
1. <af:exportCollectionActionListener> - Exports what you see on the UI table. Would not work for us, because our exported data is different than whats on screen. (eg: whole addresses are displayed as a single column, but broken down as component city and state columns in exported data )
2. redirect to a servlet - admittedly half baked idea - fiire an action that will generate the report, then put it in sessionScope , redirect to a servlet that would pick up the report from session and stream it to the user by setting the servlet's response content type. Very unsure if this would fly in a portlet environment (sorry, I'm new to portlets) and even if it does, section 184.108.40.206 in the web center dev guide says :
Do not redirect or forward a request within your JSP. JSR 168 only supports requestDispatcher.include(). The use of httpServletResponse.sendRedirect() or requestDispatcher.forward() results in exceptions and errors.
Am I overlooking some feature that would let me do this or whats the recommended method to achieve this functionality of exporting a file generated at run-time in a portlet environment ?
Edited by: Jeevan Joseph on Oct 1, 2010 4:14 PM