2.12.1. Purpose

The loading mask layer is deployed after an ajax-call. It aims at blocking the GUI to prevent further user actions until the the ajax-request has been completed.

However, the mask layer may need to be deactivated in instances where the portal requires user instructions before the previous instructions have been carried out.

Procedure 2.3. How to deactivate the ajax-loading mask

  1. Generate a script to make an asynchronous ajax-call. Use the uicomponent.doAsync() method rather than the uicomponent.event() method.

    For example:

    <a href="<%=uicomponent.doAsync(action, beanId, params)%>" alt="">Asynchronous</a>
    
  2. The doAsync() method automatically adds the following new parameter to the parameters list; asyncparam = new Parameter(AJAX ASYNC,"true"); (AJAX ASYNC == "ajax async")

    This request is asynchronous and the ajax-loading mask will not deployed.

    Note

    An asynchronous request can still be made using the uicomponent.event(). When using this method, the asyncparam must be added manually.

The GUI will be blocked to ensure that the user can only request one action at one time and while the request seems to be synchronous, all ajax requests are always asynchronous. For further information, refer to Section 2.12.2, “Synchronous issue”.

Copyright ©2012. All rights reserved. eXo Platform SAS