ICEmobile
  1. ICEmobile
  2. MOBI-144

mediacast page rendering problem

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 Beta
    • Fix Version/s: 1.0 Final
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEmobile/mediacast/desktop browser

      Description

      When using mediacast from desktop browser, if you select a photo and upload, the entire page rerenders.

        Activity

        Steve Maryka created issue -
        Hide
        Steve Maryka added a comment -

        Not sure if this is an application issues, but assigning to Patrick for analysis.

        Show
        Steve Maryka added a comment - Not sure if this is an application issues, but assigning to Patrick for analysis.
        Steve Maryka made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Patrick Corless [ patrick.corless ]
        Hide
        Patrick Corless added a comment -

        I can also see the refresh happening on submit of a photo both locally and on labs. Interestingly though the refresh doesn't occur on the browser that only gets a push. I disabled push and there was no refresh issue for the browser submiting the file.

        It almost looks like it's there is a state issue between the returning image upload response and the push response. I'll bring this issue up in the status call.

        Show
        Patrick Corless added a comment - I can also see the refresh happening on submit of a photo both locally and on labs. Interestingly though the refresh doesn't occur on the browser that only gets a push. I disabled push and there was no refresh issue for the browser submiting the file. It almost looks like it's there is a state issue between the returning image upload response and the push response. I'll bring this issue up in the status call.
        Patrick Corless made changes -
        Assignee Patrick Corless [ patrick.corless ] Ted Goddard [ ted.goddard ]
        Hide
        Patrick Corless added a comment -

        Can you verify that the file upload is doing a post and thus a refresh.

        Show
        Patrick Corless added a comment - Can you verify that the file upload is doing a post and thus a refresh.
        Hide
        Ted Goddard added a comment -

        Currently the desktop variant of mediacast uses a full-page POST to perform the upload.

        Show
        Ted Goddard added a comment - Currently the desktop variant of mediacast uses a full-page POST to perform the upload.
        Hide
        Ted Goddard added a comment -

        The following works on Safari, Chrome, and Firefox:
        (it will need to be adapted to JSF, however)

        <html>
        <head>
        <title>getFormData Test</title>
        </head>
        <body >
        <script>
        function sendIt()

        { var formElement = document.getElementById("theform"); var oXHR = new XMLHttpRequest(); oXHR.open("POST", "nosuchpage.html"); oXHR.send(new FormData(formElement)); }

        </script>
        getFormData Test<br>
        <form id="theform">
        <input type="text" size="40" id="applink" name="applink">
        <input type="file" id="thefile" name="thefile">
        <input type="button"
        onclick="sendIt();"
        value="what">
        </form>
        </body>
        </html>

        Show
        Ted Goddard added a comment - The following works on Safari, Chrome, and Firefox: (it will need to be adapted to JSF, however) <html> <head> <title>getFormData Test</title> </head> <body > <script> function sendIt() { var formElement = document.getElementById("theform"); var oXHR = new XMLHttpRequest(); oXHR.open("POST", "nosuchpage.html"); oXHR.send(new FormData(formElement)); } </script> getFormData Test<br> <form id="theform"> <input type="text" size="40" id="applink" name="applink"> <input type="file" id="thefile" name="thefile"> <input type="button" onclick="sendIt();" value="what"> </form> </body> </html>
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27270 Thu Jan 19 14:41:03 MST 2012 ted.goddard ajax-based file upload (MOBI-144)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/mediacast/src/main/webapp/WEB-INF/includes/content/home.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/device/camera-example.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/device/camcorder-example.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/resources/org.icefaces.component.util/component.js
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/device/microphone-example.xhtml
        Hide
        Ted Goddard added a comment -

        component.js now overrides ice.submitFunction if ajax file upload is possible (FormData is supported). This removes mobi:uploadHelper from the demo pages, so desktop browsers that do not support FormData now are no longer able to upload files. If a developer wishes to support older browsers, uploadHelper can be added to the page (it's likely possible that this could be added conditionally based on the browser type).

        Show
        Ted Goddard added a comment - component.js now overrides ice.submitFunction if ajax file upload is possible (FormData is supported). This removes mobi:uploadHelper from the demo pages, so desktop browsers that do not support FormData now are no longer able to upload files. If a developer wishes to support older browsers, uploadHelper can be added to the page (it's likely possible that this could be added conditionally based on the browser type).
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27418 Thu Jan 26 14:30:12 MST 2012 ted.goddard test for web Worker to not use buggy FormData on iOS 4 (MOBI-144)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27621 Thu Feb 02 14:08:34 MST 2012 ted.goddard test for BlackBerry and disable FormData submit on that platform (MOBI-144)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27733 Thu Feb 09 14:05:05 MST 2012 ted.goddard test for BlackBerry was interfering with detection on other platforms, now testing for window.clientInformation (MOBI-144)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27743 Thu Feb 09 15:21:51 MST 2012 ted.goddard stock browsers on android and BlackBerry also need uploadhelper (MOBI-144)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/src/org/icefaces/mobi/component/uploadhelper/UploadHelper.java
        Migration made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Steve Maryka
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: