SAP CRM WebClient UI cross component跳转的一个具体例子
这是cross component navigation在起作用。
Result list是model在ICQR里面,如果点service,会navigate到service detail page,这个service detail page是做在PRD02OV上,所以这个navigation是cross component navigation:
Cross component navigation又叫object based navigation:
Line 26行根据当前选中的product type动态determine出应该进material page,还是service,或者warrenty。。。。

Navigation object在35行生成。

Deterimine了target ui之后,框架准备开始render target UI:
这里能看到02QR已经成功determine出来了

这样,02QR的do_init_context就会被框架call到了。

在新建项目菜单里,

Category选择为SAP Fiori Elements,模板选择为List Report Application:


该List Report Application消费的OData服务,从Service Catalog的下拉菜单里选择指向ES5系统的Destination,从中选择EPM_REF_APPS_SHOP_SR这个服务:

选择Suppliers这个data collection:

OData Collection选择Suppliers:

一切就绪后,运行:

看到空白的页面,这是因为我们尚未在该List Report Application里指定更多有意义的annotation:

新建一个annotation文件,用来存放我们的自定义注解:


而manifest.json也自动引用了我们刚刚创建的annotation.xml:

新建一个annotation:


注解类型选择为UI.LineItem:

在UI.LineItem下再创建一个DataFieldWithURL注解:

再添加一个UI.DataField注解。这样,在Fiori Elements绘制的表格里出现了两列,分别通过UI.DataFieldWithUrl和UI.DataField实现。

在添加一个UI.PresentationVariant注解,实现排序功能:

把UI.PresentationVariant.SortOrder.Common.SortOrder施加到Name字段上:

这样Name字段就支持自动排序了:

通过UI.HeaderInfo注解,我们可以维护对用户更友好的信息:

分别通过UI.HeaderInfo的TypeName和TypeNamePlural维护HeaderInfo的单数和复数形式:

效果如下:

- 点赞
- 收藏
- 关注作者
评论(0)