Hello,
We have a page that displays on a grid the results returned by a service. We also store the results on a local variable, so that the following time the user requests the page, the service is not called, we get the info from the local variable. The code is aprox as follows:
code
if (localStorage.getItem("listResult")!=null){
ResultList_GET.requestOptions.echo = localStorage.getItem("listResult");
ResultList.execute();
}else{
ResultList_GET.requestOptions.echo = '';
ResultList.execute();
}
/code
(on sucess event of ResultList we saved the result in local storage:
code
localStorage.setItem("listResult", JSON.stringify(data));
/code
This work fine. However, we have tried to implement this for the carousel component and we have a problem: The first time, it works ok, but the second time, in line:
code
ResultList.execute();
/code
I recived the next error:
carousel refresh appery.js:243
Uncaught Error: cannot call methods on carousel prior to initialization; attempted to call method 'refresh' jquery-1.8.2.js:477
jQuery.extend.errorjquery-1.8.2.js:477
(anonymous function)jquery.mobile-1.3.0.js:539
jQuery.extend.eachjquery-1.8.2.js:611
jQuery.fn.jQuery.eachjquery-1.8.2.js:241
$.fn.(anonymous function)jquery.mobile-1.3.0.js:535
Appery.ApperyMobileCarouselComponent.$t.TiggziMobileCarouselComponent.$t.TiggrMobileCarouselComponent.$t.createClass.refreshappery.js:2440
(anonymous function)appery.js:882
jQuery.extend.eachjquery-1.8.2.js:611
Appery.RenderVisitor.$t.createClass.refreshComponentappery.js:872
Appery.DataSource.$t.createClass.updateComponentsappery.js:1378
Appery.DataSource.$t.createClass.successHandlerappery.js:1383
Appery.DataSource.$t.createClass.__responseDataHandlerappery.js:1411
proxyjquery-1.8.2.js:775
Appery.RestService.$t.createClass.processappery.js:1554
Appery.DataSource.$t.createClass.executeappery.js:1483
.........
Any hints on what the problem might be?