我需要在standardListItem
拖动时检索附加到 a 的一些数据。我正在使用可拖动的 jQuery-UI 处理拖动。我做了以下事情:
var oItemTemplate = new sap.m.StandardListItem();
oItemTemplate .bindProperty("title", "ListModel>oLabel");
oItemTemplate .data("usefulListData","ListModel>EdmType");
oItemTemplate .addStyleClass("Draggable");
oItemTemplate .setType(sap.m.ListType.Active);
oItemTemplate .attachPress(function( ){
console.log(this.data("usefulListData"));
console.log("item pressed");
});
但是数据检索仅在StandardListItem
单击时才起作用,在拖动元素时我不起作用。所以,想法是附加数据检索mouseenter
,如何附加事件监听器mouseenter
。