ICEfaces
  1. ICEfaces
  2. ICE-4955

ice:dataExporter fails if browser popup-blocker is enabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When using the ice:dataExporter with a browser with popup-blocking enabled (Safari, FF, etc.) the data export will fail, unless the user disables popup blocking in the browser. In Safari, it's particularly bad as the browser does not give any indication that the popup is being blocked, leaving the user to wonder why his export isn't working.

      If possible, we should rework the dataExporter to avoid trigger popup blockers. I've noticed that the ice:outputResource component manages to download files without triggering it, so perhaps it could be used as a reference for the proper technique.

        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 1.8.2 [ 10190 ]
        Assignee Priority P2
        Assignee Adnan Durrani [ adnan.durrani ]
        Adnan Durrani made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Adnan Durrani added a comment -

        Fact: Any window.open() call will be caught by the popup blocker which has been made without user interaction or executed by eval().

        • OutputResource and DataExporter component difference:
          Both components use window.open(), but the difference is that the outputResource pre-renderes the resource path to the onclick attribute of the commandButton , so when user clicks on the button it directly makes the window.open() call which invokes a servlet and JSF Lifecycle never gets executed. While the dataExporter download link causes a JSF life cycle to be begin, during the lifecycle component creates appropriate file makes window.open() call using JavaScript context API, which obviously uses eval() that is why dataExporter caught by the popup blocker.

        Seems like there isn't any javascript solution or technique.

        Show
        Adnan Durrani added a comment - Fact: Any window.open() call will be caught by the popup blocker which has been made without user interaction or executed by eval(). OutputResource and DataExporter component difference: Both components use window.open(), but the difference is that the outputResource pre-renderes the resource path to the onclick attribute of the commandButton , so when user clicks on the button it directly makes the window.open() call which invokes a servlet and JSF Lifecycle never gets executed. While the dataExporter download link causes a JSF life cycle to be begin, during the lifecycle component creates appropriate file makes window.open() call using JavaScript context API, which obviously uses eval() that is why dataExporter caught by the popup blocker. Seems like there isn't any javascript solution or technique.
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2 P3
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19317 Tue Sep 29 17:14:22 MDT 2009 adnan.durrani Fix for ICE-4955 (ice:dataExporter fails if browser popup-blocker is enabled)Also introduces a new attribute "popupBlockerLabel".
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/extras.js
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/common-web/WEB-INF/includes/examples/custom/dataTable-dataExporter.jspx
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice_cust_properties/cust-dataExporter-props.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/dataexporter/DataExporter.java
        Hide
        Adnan Durrani added a comment -

        New attribute added named as "popupBlockerLabel".

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-dataExporter-props.xml
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\samples\component-showcase\common-web\WEB-INF\includes\examples\custom\dataTable-dataExporter.jspx
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-dataExporter-props.xml
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\samples\component-showcase\common-web\WEB-INF\includes\examples\custom\dataTable-dataExporter.jspx
        Completed: At revision: 19317

        Show
        Adnan Durrani added a comment - New attribute added named as "popupBlockerLabel". Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-dataExporter-props.xml Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\samples\component-showcase\common-web\WEB-INF\includes\examples\custom\dataTable-dataExporter.jspx Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-dataExporter-props.xml Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\samples\component-showcase\common-web\WEB-INF\includes\examples\custom\dataTable-dataExporter.jspx Completed: At revision: 19317
        Adnan Durrani made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19319 Wed Sep 30 10:43:46 MDT 2009 adnan.durrani Fix related to ICE-4955. IE6 and 7 issue fixed.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/extras.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19320 Wed Sep 30 11:12:22 MDT 2009 adnan.durrani Typo fixed related to ICE-4955
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/extras.js
        Hide
        Joanne Bai added a comment -

        Tested on 1.8.2 build 6 + tomcat 6 using component showcase facelets-enh.

        1. In Opera 10, Safari 4, and FF3.5, if the pop up blocker is on, the message "Popup Blocker detected - click here to resume download..." will show and resume the downloading successfully

        2. in IE6, downloading will proceed regardless of the status of the pop up blocker

        3. In IE7, downloading would not start unless the Ctrl key is held down at the same time. This happens regardless of the status of the pop up blocker as well.

        Show
        Joanne Bai added a comment - Tested on 1.8.2 build 6 + tomcat 6 using component showcase facelets-enh. 1. In Opera 10, Safari 4, and FF3.5, if the pop up blocker is on, the message "Popup Blocker detected - click here to resume download..." will show and resume the downloading successfully 2. in IE6, downloading will proceed regardless of the status of the pop up blocker 3. In IE7, downloading would not start unless the Ctrl key is held down at the same time. This happens regardless of the status of the pop up blocker as well.
        Hide
        Joanne Bai added a comment -

        Tld doc is verified having been updated in 1.8.2 build 6

        Show
        Joanne Bai added a comment - Tld doc is verified having been updated in 1.8.2 build 6
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Adnan Durrani added a comment -

        Applied Ken's suggestion to handle IE6 and IE7.

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js
        Completed: At revision: 19319

        Show
        Adnan Durrani added a comment - Applied Ken's suggestion to handle IE6 and IE7. Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\extras.js Completed: At revision: 19319
        Adnan Durrani made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Adnan Durrani made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Adnan Durrani made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20024 Fri Dec 18 11:36:35 MST 2009 adnan.durrani 1.8.2EE DataExporter changes moved to Compat DataExporter towards ICE-4481. The changes include the fix of following JIRAs ICE-4484, ICE-4390, ICE-4660, ICE-4223, ICE-4823, ICE-4836, ICE-4837, ICE-4764, ICE-4730, ICE-4844, ICE-4289, ICE-4826, ICE-4863, ICE-4934, ICE-4955
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/component-metadata/src/main/resources/conf/ice_cust_properties/cust-dataExporter-props.xml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/resources/META-INF/resources/ice-extras.js
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/samples/component-showcase/web/WEB-INF/includes/examples/custom/dataTable-dataExporter.xhtml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/dataexporter/DataExporter.java
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/dataexporter/DataExporterRenderer.java
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/java/com/icesoft/faces/util/CoreUtils.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P3

          People

          • Assignee:
            Adnan Durrani
            Reporter:
            Ken Fyten
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: