当我单击删除按钮时,我面临的问题是我无法从列表中删除任何行或多行。这是我的代码:
{
xtype: 'list',
store: "Plays",
itemId:"playsList",
mode: 'MULTI',
loadingText: "Loading PlaysList...",
emptyText: '<div class="notes-list-empty-text">No PlayList found.</div>',
itemTpl: '<div class="list"><div class="list-item-title">{title}</div><div class="list-item-narrative">{duration}</div><div class="list-item-hide">{hidden}</div></div>',
itemSelector: 'div.list',
},
{
xtype: "button",
iconCls: "trash",
iconMask: true,
itemId: "deleteButton"
},
onDeleteButtonTap: function () {
//console.log("deleteNoteCommand");//How to get value of recored from playlist
this.fireEvent("deleteNoteCommand", this);
},
现在我选择任何行并单击删除按钮然后我如何获取所选项目或行的值并通过点击按钮执行一些操作。像这里我正在删除选定的行控制器
Ext.define("PlayListApp.controller.Plays", {
extend: "Ext.app.Controller",
config: {
refs: {
// We're going to lookup our views by xtype.
notesListView: "playslistview",
notesList: "#playsList",
},
},
onDeleteNoteCommand: function () {
console.log("onDeleteNoteCommand");
var noteEditor = this.getNotesList();
console.log(noteEditor);
}