为什么我的智能控件不显示任何数据? [英] Why don't my smart controls display any data?

查看:20
本文介绍了为什么我的智能控件不显示任何数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SmartForm中的My SmartField不在UI中呈现数据。我不明白为什么。输入值中具有相同OData路径的SimpleForm工作正常。

视图中的SmartForm:

<smartform:SmartForm
  editable="true" 
  app:defaultCheckBoxDisplayBehaviour="OnOff"
  app:defaultDropDownDisplayBehaviour="idAndDescription"
  editTogglable="true"
  editToggled="handleEditToggled"
  layout="ResponsiveGridLayout">
  <smartform:Group>
    <smartform:GroupElement>
      <smartfield:SmartField id="zgutInputDescr" value="{ZGUT_CDS_UI5_CDS>Descr}">
        <smartfield:layoutData>
          <l:GridData span="XL2 L2 M2 S2"/>
        </smartfield:layoutData>
      </smartfield:SmartField>
    </smartform:GroupElement>
  </smartform:Group>
</smartform:SmartForm> 

推荐答案

根据文档,智能控件只能使用未命名的模型。来自topic "Prerequisites"

智能控件需要默认OData模型,不支持命名模型。

因此,通过从manifest.json和其他位置删除模型名称解决了此问题。

<!-- ... -->
  <smartfield:SmartField id="zgutInputDescr" value="{Descr}">
<!-- ... -->

这篇关于为什么我的智能控件不显示任何数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆