Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  loading bar for ICN

    Posted Wed September 16, 2020 05:18 AM

    Hi,

    I am trying to download a file in menu action js from a URL. If its a big file say 1GB, it takes more time and since no activity no browser, the browser times out after sometime.

    Could I get some advise or snippet how to build a loading icon/progress bar in dojo so that the browser session stays alive or any parameter to do that.

    I tried keeping timeout in xhr call as higher values, it doesnt work and the browser still times out.

    Below Snippet how I am getting the data using xhr call.

    var xhrArgs = {

    url: URL,

    sync: true,

    timeout:84000

    }

    var deferred = dojo.xhrGet(xhrArgs);



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: loading bar for ICN

    Posted Wed September 16, 2020 05:26 AM

    for status bar you can use ecm/widget/dialog/StatusDialog or dojox/widget/Standby



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: loading bar for ICN

    Posted Wed September 16, 2020 08:55 AM

    ecm/widget/dialog/StatusDialog or dojox/widget/Standby use this.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: loading bar for ICN

    Posted Wed September 16, 2020 09:02 AM

    Hi,

    Maybe you can try to send a 'Ping' request to the ICN server once in a while to keep the session valid.

    Thanks,

    Jason



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 5.  RE: loading bar for ICN

    Posted Thu September 17, 2020 07:49 PM

    Even if I use it before xhr call, its gets called only after xhr call is completed and when the download starts which is defeating the purpose. the status dialog should appear the moment my action is called.

    But like I mentioned above, its only getting called when the download begins on screen. Any suggestions.

    var statusDialog = new statusDialog();

    statusDialog.show();

    var xhrArgs = {

    url: URL,

    sync: true


    }

    // Call the asynchronous xhrGet

    var deferred = dojo.xhrGet(xhrArgs);




    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration