ICEfaces
  1. ICEfaces
  2. ICE-7415

dataExporter caching previously exported data set

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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

      The ice:dataExporter currently caches it's exported data. If you toggle the number of visible of columns/data, the new export will contain the previous export. The component should be improved to it's clear it's cached fie after each export.

        Activity

        Hide
        Subodh Godbole added a comment -

        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.

        Show
        Subodh Godbole added a comment - 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.
        Hide
        Tyler Johnson added a comment -

        I created a test case where a commandButton toggled includeColumns but the resulting data export was not refreshed.

        Show
        Tyler Johnson added a comment - I created a test case where a commandButton toggled includeColumns but the resulting data export was not refreshed.
        Hide
        Tyler Johnson added a comment -

        Test case attached.

        Show
        Tyler Johnson added a comment - Test case attached.
        Hide
        Arturo Zambrano added a comment -

        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.

        Show
        Arturo Zambrano added a comment - 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.
        Hide
        Arturo Zambrano added a comment -

        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.

        Show
        Arturo Zambrano added a comment - 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.
        Hide
        Arturo Zambrano added a comment -

        committed changes to compat component at revision 26384

        Show
        Arturo Zambrano added a comment - committed changes to compat component at revision 26384

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Tyler Johnson
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: