Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-1.8.2.GA_P03, 2.1-Beta
-
Fix Version/s: 3.0.RC1, 3.0, EE-1.8.2.GA_P04
-
Component/s: ICE-Components
-
Labels:None
-
Environment:-
-
Assignee Priority:P1
Description
-
Hide
- sf-10586.war
- 6.44 MB
- Tyler Johnson
-
- META-INF/MANIFEST.MF 0.0 kB
- ICEfacesPage1.jspx 2 kB
- WEB-INF/classes/com/.../basic/TableBean.java 5 kB
- WEB-INF/.../TableBean$InventoryItem.class 1 kB
- WEB-INF/classes/.../basic/TableBean.class 3 kB
- WEB-INF/classes/com/.../tutorial/.DS_Store 6 kB
- WEB-INF/classes/com/.../icefaces/.DS_Store 6 kB
- WEB-INF/classes/com/icesoft/.DS_Store 6 kB
- WEB-INF/classes/com/.DS_Store 6 kB
- WEB-INF/classes/.DS_Store 6 kB
- WEB-INF/faces-config.xml 0.8 kB
- WEB-INF/lib/backport-util-concurrent.jar 319 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/icefaces-comps.jar 1.75 MB
- WEB-INF/lib/icefaces.jar 1.22 MB
- WEB-INF/lib/jxl.jar 708 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/lib/icefaces-facelets.jar 596 kB
- WEB-INF/lib/jsf-api.jar 355 kB
- WEB-INF/lib/jsf-impl.jar 837 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/web.xml 4 kB
- index.jsp 0.1 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
I created a test case where a commandButton toggled includeColumns but the resulting data export was not refreshed.
Test case attached.
An analysis of the ice:dataExporter component revealed that the component assumes that the exporting action will be triggered only once in the view. This means that after triggering the exporting action in the server, the exporter button/link changes its state to load the URL of the generated resource in a new popup window to deal past popup blockers. The button never goes back to its initial state where it could trigger a new exporting action. A simple test of modifying the javascript was carried out to make the button go back to its initial state after a second click. While the button did trigger a new exporting action, the component in the server didn't clear the reference to the previous resource. While it would be relatively easy to make the component refresh its reference to the previously generated resource, another issue remains: If after clicking the button for the first time and getting the browser's warning message, the user decides to download the file by selecting the appropriate option in this warning message, the user would still have to click the button again (and download the file again) to make the button go back to its initial state. The button and the server side code don't have a way of knowing if the resource was downloaded by selecting one of the options presented in the warning message of the browser. Therefore, a more elaborate structural change is necessary. Probably, it would be convenient to implement the same file-delivering mechanism used in the newer ace:dataExporter component, which doesn't require the user to click twice the same button and doesn't use popup windows (except in IE7 and older versions). This mechanism also doesn't cause browsers to display warning messages and the component object doesn't cache the resource objects.
Committed fix at revision 26364. The file is now served through a hidden iframe instead of a popup window, in most browsers, so there's no need to click the button again, and each click triggers a new exporting action that will reflect any updates made to the table.
committed changes to compat component at revision 26384
This issue is not only limited to toggling visible columns. This is also valid if data in the table is dynamic and gets changed on user actions or by server push!. So, the key here would be clearing cached file after each export - as mentioned in the Description's last line.