調用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