Question

I am trying to substitute the text value in the constructor of the busyindicator with a variable rather hardcoding it. But for some reason the app is not able to understand the variable...

function wlCommonInit(){
    var locale = "Caricamento";
    var busyIndicator = new WL.BusyIndicator('content',{text:locale}); 
    busyIndicator.show();
}
Was it helpful?

Solution

WL.BusyIndicator's text option expect a string, so you may not place a variable.

Instead, use WL.ClientMessages. For example:

var busy;

function wlCommonInit(){
    WL.ClientMessages.loading = "טוען...";
    busy = new WL.BusyIndicator();
    busy.show();
}


Reading material:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top