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

          Mark Collette created issue -
          Tyler Johnson made changes -
          Field Original Value New Value
          Support Case References https://www.icesoft.ca:4443/supportilla/show_bug.cgi?id=4703
          Ken Fyten made changes -
          Link This issue is duplicated by ICE-2224 [ ICE-2224 ]
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 1.7.1 [ 10122 ]
          Mark Collette made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Priority P1
          Assignee Mark Collette [ mark.collette ]
          Mark Collette made changes -
          Link This issue blocks ICE-3122 [ ICE-3122 ]
          Mark Collette made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mark Collette made changes -
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial]
          Mark Collette made changes -
          Link This issue blocks ICE-3042 [ ICE-3042 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1
          Assignee Mark Collette [ mark.collette ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: