This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,006 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

File download from a portletized ADF app running in webcenter spaces.

783906
783906 Member Posts: 38
edited Oct 4, 2010 3:29PM in JDeveloper and ADF
Hi,

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 : 11.1.1.3
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 30.2.5.5 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 30.2.5.2 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

Answers

This discussion has been closed.