Sapui5 Can';无法检索绑定上下文
我需要能够从列表中的StandardListItem检索绑定上下文+路径 但是,Sapui5 Can';无法检索绑定上下文,sapui5,Sapui5,我需要能够从列表中的StandardListItem检索绑定上下文+路径 但是,getBindingContext()返回未定义的 我用oEvent的oSource搜索了oBindingContexts属性,它就在那里 onJobPress:功能(oEvent){ var oSource=oEvent.getSource(); var oBindingContext=oSource.getBindingContext();//未定义 var oPath=oBindingContext.getPa
getBindingContext()
返回未定义的
我用oEvent
的oSource
搜索了oBindingContexts
属性,它就在那里
onJobPress:功能(oEvent){
var oSource=oEvent.getSource();
var oBindingContext=oSource.getBindingContext();//未定义
var oPath=oBindingContext.getPath();//错误
var data=oBindingContext.getProperty(oPath);//错误
// ...
},
您使用过命名模型吗?那就是:
oSource.getBindingContext("modelName");
你用过命名模型吗?那就是:
oSource.getBindingContext("modelName");
可能的重复可能的重复