EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
  • 1.  How to disable ui and show progress symbol? DojoDialog?

    Posted Tue November 13, 2012 08:43 AM
    EGL tooling and version: RBD v8.0.1.3
    Target environment: Windows 7, WAS v7.0
    Application type: Rich UI

    I want to disable the entire user interface and show a progress symbol until the end of an operation/service call.
    I tried using a DojoDialog from the samples_2.1.0 project and it works fine.
    But there is a problem: The user may close the dialog any time by clicking x or pressing Esc.
    The property "closable", which is described in the documentation, is not a valid property in my EGL version.
    I have the following questions:
    • Is it possible to make a DojoDialog non closable? I found old posts from 2009 saying there's a bug.
    • Is there another proper way for blocking the ui and showing a progress symbol?

    Günter
    SystemAdmin


  • 2.  Re: How to disable ui and show progress symbol? DojoDialog?

    Posted Tue November 13, 2012 01:45 PM
    The technique I am most familiar with involves using zindex to place a visual element "over" the active UI -- thus preventing any user interaction with the UI. You can style your own dialog or use a progress bar or something to indicate to the user that activity is taking place.

    Create yourself a custom widget so that this "waiting" dialog and the UI protection becomes a reusable component in your applications.

    You will commonly see the visual element that acts as the UI overlay styled such that it is semi-opaque rather than completely translucent. This further indicates to the user that the UI is not active.

    Here's an example of a semi-opaque element that you could use to provide the UI protection:

    greyBox HTML { position = "absolute", visibility = "hidden", zIndex = 5000, background = "lightgrey", opacity = 0.5, x = 0, y = 0 };


    Add this to the DOM in your custom widget's onConstruction function with the following (this way you don't have to make it a child element in your application's UI):

    document.body.appendChild(greyBox);


    Set a width and height for "greyBox" appropriately to cover your UI. Then, when you set visibility="visible", the UI will be protected.

    A full implementation might allow you to specify a zIndex to use for the overlay and a determine a width/height for the UI using a technique such as:

    gbwidth int = document.body.parent.getAttribute("scrollWidth"); gbheight int = document.body.parent.getAttribute("scrollHeight");


    Your custom widget will also need "show/hide" type functions or use the InfoBus so that it can be easily controlled.

    --Dan
    dan_darnell


  • 3.  Re: How to disable ui and show progress symbol? DojoDialog?

    Posted Wed November 14, 2012 02:07 AM
    Thanks Dan!

    I will try to implement that in my code.

    Günter
    SystemAdmin


  • 4.  Re: How to disable ui and show progress symbol? DojoDialog?

    Posted Wed November 14, 2012 11:37 AM
    Send me an e-mail (you can find my contact info on my web site at www.dandarnellonline.com) and I will be happy to send you a simple widget we use to get you started.

    --Dan
    dan_darnell


  • 5.  Re: How to disable ui and show progress symbol? DojoDialog?

    Posted Fri August 05, 2016 01:52 PM

    Hello Dan ..


    I found your tip to the situation and is what we need, but I'm with implementation difficulties .. Could you send us details ..

    We need to protect the window so that the user does not close it, and better, we actually have full control of the window, how to minimize, close, etc ..

    Would this experience to share with us. ??

    Thank you
    Osvaldo Menezes

    ojomenezes


  • 6.  Re: How to disable ui and show progress symbol? DojoDialog?

    Posted Tue August 09, 2016 07:54 AM

    Hi Osvaldo,

     

    I think you have to use JavaScript external types like this:

     

            "lockPage" : function() {            var blurDiv = document.createElement("div");            blurDiv.id = "blurDiv";                    blurDiv.style.width="100%";            blurDiv.style.height="100%";            blurDiv.style.visibility="visible";            blurDiv.style.position="fixed";            blurDiv.style.zIndex="9999";            blurDiv.style.top="0px";            blurDiv.style.left="0px";            blurDiv.style.opacity = "0.35";            blurDiv.innerHTML = '<center> <h1> Saving data, please wait...';            document.getElementsByTagName("body")[0].appendChild(blurDiv);        },                "unlockPage" : function() {                var blurDiv = document.getElementById("blurDiv");                blurDiv.parentNode.removeChild(blurDiv);        },

     

     

     

    By the way I don't think it's a good idea to post in this old threads...

     

     

     

    Marcel-D


  • 7.  Re: How to disable ui and show progress symbol? DojoDialog?

    Posted Sun November 06, 2016 06:30 PM

    hello Marcel-D, grateful for the help ..
    Osvaldo

    ojomenezes