我在 manifest.json 的 extends 区域里定义了一个普通的自定义按钮,global 属性为 false:json
"extends": { "extensions": { "sap.ui.controllerExtensions": { "sap.suite.ui.generic.template.ListReport.view.ListReport": { "controllerName": "com.sap.jerry.jerryfioriapp.ext.controller.ListReportExtension", "sap.ui.generic.app": { "SEPMRA_C_PD_Product": { "EntitySet": "SEPMRA_C_PD_Product", "Actions": { "ActionName1": { "id" : "ActionName1", "text" : "Action Name One", "press" : "onCustomAction1", "requiresSelection": false, "global":false } } } } } } } },
外观以下:app
global 属性改为 true 后:ui
button 的按钮位置发生了改变,跑到页面右上角了:spa
从 breakoutActions.fragment.xml 的实现源代码里发现,custom action 还有一个 determining 属性:code
设成 true 以后,跑到屏幕下方 footer 区域了。虽然位置发生了变化,不影响点击按钮后的事件响应。xml
更多Jerry的原创文章,尽在:"汪子熙":事件