Ibm mobilefirst IBM Worklight:总线指示器未显示
我试图显示一个BusyIndicator,但当我运行项目时,它没有显示。 这是我的main.js:Ibm mobilefirst IBM Worklight:总线指示器未显示,ibm-mobilefirst,worklight-runtime,Ibm Mobilefirst,Worklight Runtime,我试图显示一个BusyIndicator,但当我运行项目时,它没有显示。 这是我的main.js: var busyInd; function wlCommonInit() { busyInd = new WL.BusyIndicator('content', {text : 'Loading...'}); mostraDialogo(true); } function mostraDialogo(on) { if (on) busyInd.show
var busyInd;
function wlCommonInit() {
busyInd = new WL.BusyIndicator('content', {text : 'Loading...'});
mostraDialogo(true);
}
function mostraDialogo(on) {
if (on)
busyInd.show();
else
busyInd.hide();
}
怎么了?您的HTML中可能没有
内容
ID
我换了
busyInd = new WL.BusyIndicator('content', {text : 'Loading...'});
与
我可以看到忙指示灯。我还向HTML中添加了一个带有
内容ID的DIV,它也起到了作用
在实际设备或模拟器/仿真器中进行测试时,不需要ID参数,因为它使用本机忙碌指示器。在MBS中进行测试时,需要ID参数,因为使用了web繁忙指示器,并且它必须锚定到现有元素(或为空)。Worklight版本?您正在哪个移动操作系统上尝试此功能?Worklight 6.2。我正在移动浏览器模拟器上尝试这个。移动浏览器模拟器不是移动操作系统。你在MBS中预览哪些操作系统?我正在尝试在Android上预览它。事实上,我刚刚在AndroidEmulator上试用过,它确实显示了。它不在MBS上。
busyInd = new WL.BusyIndicator(null, {text : 'Loading...'});