Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    MultiUploadItem problem with IE9

    Hi,

    I'm currently using SmartGWT Power Edition 3.1 (SmartClient Version: v8.3p_2013-04-23/PowerEdition Deployment (built 2013-04-23)).

    I get the following problem in IE9, not Chrome.

    I defined a MultiUploadItem as following:

    Code:
    MultiFileItem uploadFile = new MultiFileItem("UPLOAD");
    uploadFile.setAttribute("dataSource", "rfiAttachment");
    uploadFile.setTitle("File Upload");
    It shows up well but when I click on "Save" in the pop-up displayed to add files, the list isn't refreshed properly although files get correctly uploaded.

    In developper console I get:
    Code:
    09:34:20.247 [ERROR] [application] 09:34:20.245:WARN:jsonEval:Attempt to parse strict formatted JSON response failed - falling back to eval()
    com.smartgwt.client.core.JsObject$SGWT_WARN: 09:34:20.245:WARN:jsonEval:Attempt to parse strict formatted JSON response failed - falling back to eval()
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Thread.java:662)
    Then

    Code:
    09:34:20.327 [ERROR] [application] 09:34:20.325:TMR8:WARN:UploadItem:isc_UploadItem_0[ATTACHMENT]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
    com.smartgwt.client.core.JsObject$SGWT_WARN: 09:34:20.325:TMR8:WARN:UploadItem:isc_UploadItem_0[ATTACHMENT]:Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Thread.java:662)
    Here is the output of the developper console:

    RPCRequest:
    Code:
    {
        "actionURL":"http://127.0.0.1:8888/application/sc/IDACall", 
        "showPrompt":false, 
        "transport":"xmlHttpRequest", 
        "promptStyle":"cursor", 
        "data":{
            "appID":"isc_builtin", 
            "className":"builtin", 
            "methodName":"uploadProgressCheck", 
            "arguments":[
                "isc_MultiFileItem_1_picker_uploadForm"
            ], 
            "is_ISC_RPC_DMI":true
        }
    }
    Raw request:
    Code:
    isc_tnum=4&_transaction=%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E4%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CappID%3Eisc_builtin%3C%2FappID%3E%3CclassName%3Ebuiltin%3C%2FclassName%3E%3CmethodName%3EuploadProgressCheck%3C%2FmethodName%3E%3Carguments%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%3Eisc_MultiFileItem_1_picker_uploadForm%3C%2Felem%3E%3C%2Farguments%3E%3Cis_ISC_RPC_DMI%20xsi%3Atype%3D%22xsd%3Aboolean%22%3Etrue%3C%2Fis_ISC_RPC_DMI%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E&protocolVersion=1.0
    DSRequest:

    Code:
    {
        dataSource:"rfiAttachment", 
        operationType:"add", 
        componentId:"isc_DynamicForm_13", 
        data:{
            ATTACHMENT:"C:\\fakepath\\TODO.txt", 
            RFI_REQUEST_ID:"10"
        }, 
        callback:{
            target:[DynamicForm ID:isc_DynamicForm_13], 
            methodName:"saveEditorReply"
        }, 
        willHandleError:true, 
        showPrompt:false, 
        prompt:"Saving form...", 
        oldValues:{
        }, 
        requestId:"rfiAttachment$6272", 
        clientContext:{
        }, 
        useStrictJSON:true, 
        fallbackToEval:true, 
        form:[DynamicForm ID:isc_MultiFileItem_1_picker_uploadForm], 
        saveDataCallback:"isc_MultiFileItem_1_picker.hide()", 
        timeout:0, 
        afterFlowCallback:"isc_DynamicForm_13.$49z(dsRequest, dsResponse, data)", 
        directSubmit:true, 
        submitForm:[DynamicForm ID:isc_DynamicForm_13], 
        editor:[DynamicForm ID:isc_DynamicForm_13], 
        bypassCache:true
    }
    Raw response:
    Code:
    [
        {
            data:[
                {
                    ATTACHMENT_DATE_CREATED:"2013-06-10T08:50:29", 
                    ATTACHMENT_FILENAME:"TODO.txt", 
                    ID:13, 
                    RFI_REQUEST_ID:10, 
                    ATTACHMENT_FILESIZE:118
                }
            ], 
            invalidateCache:false, 
            isDSResponse:true, 
            operationType:"add", 
            queueStatus:0, 
            status:0
        }
    ]
    Thanks in advance for your help
    Regards

    #2
    Just a note to let you know we are taking a look.

    Regards
    Isomorphic Software

    Comment


      #3
      Hi,

      Please note I've been able to solve this issue by correcting MultiFileItem instanciation (probably a mistake with defining the master/detail references) and fetching data at page load time.

      No explanation why it worked on Chrome though.

      Rgds

      Comment


        #4
        Out of interest, what did you change?

        Comment


          #5
          After few tests I understood it was linked to myimplementation: my master record is created only on first fetch or file added; if auto fetch data is disabled on the form we don't have the master id reference and it is somehow not added to the form afterwards.

          I fixed it by enabling auto fetch data and adding master record (if not existing yet) on fetch.

          Comment

          Working...
          X