【问题标题】:SAPUI5 - navigation - Binding not workingSAPUI5 - 导航 - 绑定不起作用
【发布时间】:2015-01-07 08:02:32
【问题描述】:

演示 - http://jsbin.com/bukanagobu/1/edit

问题是当我单击其中一个项目时,它会导航到下一个视图,但不显示名字和姓氏。

我已将模型保存为“数据”。

谁能帮我找出错误?

【问题讨论】:

标签: sapui5


【解决方案1】:

您在代码中犯了两个错误:

  • 单击列表中的条目获取绑定上下文时,您必须指定命名模型名称“数据”:

    var oBindingContext = evt.getSource().getBindingContext("data"); 
    // if using named models, specify which model you want to use 
    
  • 另外,在将绑定上下文设置为详细视图时,您还必须将模型名称设置为“数据”:

    page2.setBindingContext(oBindingContext, "data"); 
    // also, name the context model to 'data' 
    

在此处查看更新的 JSBin:http://jsbin.com/fehoqu/1/edit?html,output

【讨论】:

    猜你喜欢
    • 2018-06-04
    • 2018-08-15
    • 2020-04-30
    • 1970-01-01
    • 2015-01-14
    • 1970-01-01
    • 1970-01-01
    • 2016-12-02
    • 2019-01-31
    相关资源
    最近更新 更多