0
我有一些項目retriving形式的服務器無法刷新劍道UI使用動作片刪除項移動
<div
id="getbookmarks"
data-role="view"
data-title="my bookmarks"
data-before-show="app.views.showgetbookmarks.beforeShow"
data-show="app.views.showgetbookmarks.show"
data-layout="default" >
<div data-role="touch" >
<ul id="listview-getbookmarks" data-role="listview" data-endless-scroll="true" data-template="mF"></ul>
<div data-role="actionsheet" id="companyActionsList" data-open="app.views.showgetbookmarks.onOpen" data-close="app.views.showgetbookmarks.onClose" data-popup='{"direction": "left"}' >
<li><a href="#" data-action="app.views.showgetbookmarks.reply" class="km-button delete">Delete</a></li>
</div>
</div>
</div>
模板看起來列表視圖後,列表視圖如下
story Title <div class="h2">#= storyTitle #</div>
<p data-role="button" data-rel="actionsheet" href="\\#companyActionsList" data-actionsheet-context="#: id#">Delete</p>
</a>
</script>
和使用ajax刪除項目的功能看起來如下...我可以刪除元素,但listview無法自動重新加載。刪除後
reply: function (e) {
console.log("done"+ e.context);
var deleteid= e.context;
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: kkkkk.getServiceUrlJson() + "? hello"
,type: "POST"
,dataType: "json"
,data: {
bookmarkId:deleteid
}
,xhrFields: {
withCredentials: true
}
}
}
});
dataSource.read();
},