Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Load mask is a great feature and here in canvas we show load masks when there is an ongoing network request.

There is an option for the implementation team to avoid showing load mask by setting the “syncMode“ as false along with the params.

Example:

Code Block
languagejs
  var param = {
    "PAGE_CODE_TYPE": 'ALERT_CODE',
    "INPUT_ACTION": 'UPDATE_REFRESH_ACTION',
    "PRODUCT_NAME": 'ALERTS',
    "INPUT_FUNCTION_CODE": 'VSBLTY',
    "INPUT_SUB_PRODUCT": 'ALERTS',
    "IS_FILTER_FORM": false,
    "MSG_ID": msgId
  };
  ct.Ajax({
    params: param,
    syncMode: false,
    success: function(responseP, optionsP) {
      widObj.refreshWidgetData();
    }
  });
Info

syncMode is set in line no - 12 in above code snippet.

However using syncMode will stop showing a load mask, there are still requirements to only show a load mask if you didn’t get the response within a particular time interval. (Say 1 sec).

Implementation team can configure this time interval through env options

Example: ct.env.options.loadMask.delayLoadMaskInterval = 1000; (Unit is in milliseconds)

With above setting you will only see a load mask for requests longer than 1 second, that way shorter/smaller ajax calls will happen behind the scenes without a load-maskCanvas promotes user experience in several ways, including visual indicators to represent the progress of the activity within the application.

Progress Indicators (i.e. load masks) are visual indicators of an activity or background process in an application. However, you might want to turn those off completely or want to show those only when the server response is not received within a specific timeframe. Refer Displaying Load Mask based on Server Response and Disabling Load Mask for more information.

If suppose you need a customized load mask, you can do that too with Canvas Technology platform! Refer Custom Load Mask API for more information.