调用busyInd.hide()之前使用IBM工作灯工作室6.1.0.02-20160314-1430忙碌指示灯在Android的隐藏在工作灯6.1
正在使用多页和适配器AM。 onSuccess函数我正在加载另一个页面。并且在页面加载之后,将busyInd.hide()写入onSuccess函数中。问题是在页面加载之前隐藏繁忙指示符。在从适配器下一页加载得到响应之后,但在加载下一页之前忙指示符消失。它只发生在Android的情况下,并且相同的代码在IOS和WindowsPhone8中工作正常。
this.form3Submit = function(){
var sessionid="userID";
busyInd.show();
var invocationData = {
adapter : "API_Adapter",
procedure : "SomeSubmit",
parameters : [sessionid],
compressResponse : true
};
WL.Client.invokeProcedure(invocationData, {
onSuccess : form3SubmitSuccess,
onFailure : AdapterFail,
timeout: timeout
});
};
form3SubmitSuccess = function(result){
invocationResult = result.invocationResult;
if(invocationResult.isSuccessful) {
$("#contentData").load("Views/form4.html", null, function (response, status, xhr) {
referenceno = invocationResult.something.Response.somerefno;
if(referenceno != ''){
//some lines of code
}
if(invocationResult.something.STATUS.CODE == '0'){
//some lines of code
busyInd.hide();
}else{
//some lines of code
busyInd.hide();
}
ko.applyBindings(self, $(".dynamic-page-content").get(0));
busyInd.hide();
});
}
busyInd.hide();
};
声明忙碌指示灯照顾main.js如下
var busyInd;
function wlCommonInit(){
busyInd = new WL.BusyIndicator('content', {text : 'Loading...'});
}
你能发表一些代码片段吗?另外,当你说你正在加载另一个页面时,你如何加载该页面? AJAX或重新加载页面? –
你正在加载另一个页面的onSuccess是什么? WL.Client.connect()?你有没有为busyindicator设置任何超时值? –
添加了代码片段。 @Vivin没有为繁忙指标设置超时值 – Rajendra