Hi,
We have the following datasource
I only want it to hit the server "getMessagesFromServer()" if there is no cache (which is working) or when the user "pulls to refresh" in the listview e.g.
How can I tell messages.read that the user has forced a refresh and it needs to go to the server to get the data rather than the cache.
Thanks in advance
Eaigs
We have the following datasource
var
messages =
new
kendo.data.DataSource({
transport: {
read:
function
(operation) {
var
cachedData = localStorage.getItem(
"cachedMessages"
);
if
(cachedData !=
null
|| cachedData != undefined) {
operation.success(JSON.parse(cachedData));
}
else
{
operation.success(getMessages());
}
}
}
});
<ul id=
"messages-list-view"
data-role=
"listview"
data-source=
"messages"
data-template=
"message-template"
data-pull-to-refresh=
"true"
>
</ul>
Thanks in advance
Eaigs