ICEfaces
  1. ICEfaces
  2. ICE-2860

InputFile IFRAME render sync mode update javascript

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.7.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Right now the InputFile component renders out an IFRAME tag with a src attribute which consists of a Javascript call do document.write() with the contents of the IFRAME. This IFRAME rendering code, in InputFile.renderIFrame(-), is invoked by both the InputFileRenderer, whenever the page renders, and also by UploadServer, once the file has completed uploading.

      In synchronous mode, the InputFile.progressListener -> Bean -> OnDemandRenderer calls, and the InputFile -> PersistentFacesState.renderLater() call are both mostly useless, since they have no means to push those renders to the client.

      The only thing that is being sent to the client, is the UploadServer response, in the form of the InputFile.renderIFrame(-). If this code could be adapted, to notify the web browser to initiate an update from its end, then we could get file upload completion notification, in synchronous mode. Possibly, with multi-part MIME, we could even get file upload progress notification.

      Mircea says that because of security constraints in the web browser, we can't just render our javascript, to be executed from the IFRAME, to get the whole page's bridge to cause an update. Especially if using SSL. But, the IFRAME response could set a cookie, and the bridge could watch this cookie, and check for updates, based on it, much like how the receive-updated-views protocol works.

      Of course it would be simpler to just have the UI for the progress and completion right inside the IFRAME itself, and not have to use the cookie trick. But there might be arbitrarily numerous changes to the UI, so that might not be feasible.

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16800 Wed Jun 04 15:52:49 MDT 2008 mark.collette ICE-2860 : InputFile IFRAME render sync mode update javascript
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFile.java
          Commit graph ADD /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileProgressEvent.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/bridge/src/submit.js
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/inputfile/FileInfo.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileRenderer.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/samples/component-showcase/common-web/WEB-INF/includes/examples/custom/inputFile.jspx
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16799 Wed Jun 04 15:48:18 MDT 2008 mark.collette ICE-2860 : InputFile IFRAME render sync mode update javascript
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFile.java
          Commit graph ADD /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileProgressEvent.java
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/common-web/WEB-INF/includes/examples/custom/inputFile.jspx
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/inputfile/FileInfo.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16644 Wed May 14 15:28:59 MDT 2008 mircea.toma Trigger form submit at the start of the upload as well. ICE-2860
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/panelstack/PanelStack.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16640 Wed May 14 11:42:31 MDT 2008 mircea.toma Trigger form submit at the start of the upload as well.
          ICE-2860
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelstack/PanelStack.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16616 Thu May 08 15:46:09 MDT 2008 mircea.toma Backport fixes for ICE-2860
          Files Changed
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFile.java
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/bridge/lib/element.js
          Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16604 Thu May 08 11:22:04 MDT 2008 mircea.toma Trigger form submit on upload completion.
          ICE-2860
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFileRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/inputfile/InputFile.java

            People

            • Assignee:
              Unassigned
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: