专栏首页Jerry的SAP技术分享如何在SAP C4C的Embedded组件中检测编辑模式(EditMode)

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

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:

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 使用jconsole监测SAP commerce运行时

    It is known that we can use Hybris Administration Console to monitor the runtime...

    Jerry Wang
  • SAP UI5的控件DatePicker的DateFormat属性详解

    This blog contains my research about the date format determination for DatePicke...

    Jerry Wang
  • 明明没有发生超时错误,为什么SAP WebClient UI会显示超时错误提示?

    In my blog Timeout page and WebUI freezing issue – Another cause, the behavior ...

    Jerry Wang
  • 明明没有发生超时错误,为什么SAP WebClient UI会显示超时错误提示?

    In my blog Timeout page and WebUI freezing issue – Another cause, the behavior ...

    Jerry Wang
  • What is Human Resource Management System(HRMS)?

    What is Human Resource Management System (HRMS)? Why HRMS Software Development? ...

    用户4822892
  • 错误消息sales area is not assigned for the header product

    When I try to download customer material info record from ERP, I meet with this ...

    Jerry Wang
  • 为何JUC中有大量代码将成员变量复制到本地变量后再操作?

    总结:在性能核心部分,是有效果的(所以j.u.c和Netty大量这样搞)。 juc那么写是因为一开始就那么写(考虑到当时的jvm的现代化),而且单纯来看,loc...

    开发架构二三事
  • 100多万个视频短片数据集来啦!

    想象一下,如果我们必须向外星人解释地球上发生的所有行为。我们可以为他们提供非小说类书籍或BBC纪录片。我们可以尝试口头解释什么是电臀舞。但是,实际上,没有什么能...

    AI科技大本营
  • 如何使用Cordova将SAP Fiori应用打包并安装到Android平台上

    There is a wonderful tutorial Building SAP Fiori-like UIs with SAPUI5 in 10 Exer...

    Jerry Wang
  • Corrupted product category causes WebClient UI empty screen issue

    Once product hyperlink in sales order line item is clicked, it is expected that ...

    Jerry Wang

扫码关注云+社区

领取腾讯云代金券