前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何在SAP C4C的Embedded组件中检测编辑模式(EditMode)

如何在SAP C4C的Embedded组件中检测编辑模式(EditMode)

作者头像
Jerry Wang
发布2020-08-31 10:35:46
8370
发布2020-08-31 10:35:46
举报

My series of Cloud Application Studio Blogs

  • How to detect EditMode in an Embedded Component
  • Step by step to enable your custom BO with attachment upload functionality
  • Step by step to create an Adobe Print form in Cloud application Studio

I am working together with a partner and they would like to implement a requirement in their embedded component.

(1) The embedded component is injected to a tab in a standard Thing inspector. (2) Inside the EC there is a button. It is required that the button is only visible when Edit button in TI is clicked.

It means there must be an approach for EC which allows it to know currently it is in edit mode or not.

I find a solution for this requirement, however in my solution I use a standard field which is NOT exposed to Partner development. Since I am not responsible for the development of Cloud Studio in SAP I CANNOT guarantee this solution can still work in the future release. USE THIS SOLUTION AT YOUR OWN RISK!

(1) Add the parameter debugMode=true in UI url,

And then ctrl+click on your C4C UI, then you are allowed to review some system field in tab “DataModel”. There is a field /Root/$System/EditMode which represents current Edit mode. When TI is in edit mode, it is equal to X:

“” for display mode.

(2) Open your UI and manually create a field “EditMode” under $System node:

And bind the visibility attribute to this model field.

Test result in the runtime:

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-29 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • My series of Cloud Application Studio Blogs
相关产品与服务
Cloud Studio(云端 IDE)
Cloud Studio(云端 IDE)是基于浏览器的集成式开发环境,为开发者提供了一个稳定的云端工作站。用户在使用 Cloud Studio 时无需安装,随时随地打开浏览器即可使用。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档