0

How to freeze the UI? (using modal dialog?)

Hi everyone,
In my use case, the user action may take some time (about 10 seconds) and I want the UI to be freezed during that waiting time so that the user cannot do anything until the previous action finish.
One of the first solution I could think of is showing a kind of modal dialog which user cannot dismiss manually. The Alert Dialog is almost fit my use case but it must have at least one button which the user can dismiss by select that button. I have digged into the source code of the framework (dialogs.js) and found that it's impossible to prevent the user dismiss the dialog (or I miss something?)
So my question is:
Is there any way to create a modal dialog without any buttons? or
Is there any alternative approach to freeze the UI beside the modal dialog hack?

Many thanks in advance!
Tinh

by
4 Replies
  • Hi,

    Have you tried KONtx.utility.LoadingOverlay.on()/ KONtx.utility.LoadingOverlay.off()?

    Thanks,
    Vivek

    QUOTE(911 @ 24 Aug 2011 2:21 AM)
    Hi everyone,
    In my use case, the user action may take some time (about 10 seconds) and I want the UI to be freezed during that waiting time so that the user cannot do anything until the previous action finish.
    One of the first solution I could think of is showing a kind of modal dialog which user cannot dismiss manually. The Alert Dialog is almost fit my use case but it must have at least one button which the user can dismiss by select that button. I have digged into the source code of the framework (dialogs.js) and found that it's impossible to prevent the user dismiss the dialog (or I miss something?)
    So my question is:
    Is there any way to create a modal dialog without any buttons? or
    Is there any alternative approach to freeze the UI beside the modal dialog hack?

    Many thanks in advance!
    Tinh
    0
  • Be careful blocking the UI is frowned upon when going through QA.   Users need to be able to exit the application.
    0
  • Hi Vivek,
    The KONtx.utility.LoadingOverlay work as expected in the SidebarView but in the FullscreenView it does not work (I did not see any indicator on the screen). Is the LoadingOverlay designed to work with SidebarView only?

    Tinh

    QUOTE(Vivek Jani @ 24 Aug 2011 7:17 AM)
    Hi,

    Have you tried KONtx.utility.LoadingOverlay.on()/ KONtx.utility.LoadingOverlay.off()?

    Thanks,
    Vivek

    QUOTE(911 @ 24 Aug 2011 2:21 AM)
    Hi everyone,
    In my use case, the user action may take some time (about 10 seconds) and I want the UI to be freezed during that waiting time so that the user cannot do anything until the previous action finish.
    One of the first solution I could think of is showing a kind of modal dialog which user cannot dismiss manually. The Alert Dialog is almost fit my use case but it must have at least one button which the user can dismiss by select that button. I have digged into the source code of the framework (dialogs.js) and found that it's impossible to prevent the user dismiss the dialog (or I miss something?)
    So my question is:
    Is there any way to create a modal dialog without any buttons? or
    Is there any alternative approach to freeze the UI beside the modal dialog hack?

    Many thanks in advance!
    Tinh
    0
  • Hi Mike,
    I understand the risk, but in my use case, it's valid to freeze the UI. Thanks for your warning.

    QUOTE(Mike R. @ 24 Aug 2011 5:40 PM)
    Be careful blocking the UI is frowned upon when going through QA.   Users need to be able to exit the application.
    0

Recent Posts

in General - Yahoo! TV Widgets