SAP Fiori Elements应用里Back按钮的实现逻辑分析

简介: SAP Fiori Elements应用里Back按钮的实现逻辑分析

One of my colleagues today asked me this question: Suppose this below is an application generated by Smart Template, and I would like to debug how the back button is implemented. Since the whole UI page is implemented by framework, I don’t know where to set breakpoint. How to proceed?image.pngHere below is my process about how to find the back implementation in framework file within several minutes.


(1) Use Chrome extension Inspector ( the UI5 tab in Chrome development tool below ) to figure out that the button is located in UI area sap.uxap.ObjectPageHeader.image.pngBased on the learning in My understanding about how object page in Smart Template is rendered I search by keyword “Back” in file Details.view.xml first, no result.image.png(2) Then search in next xml file NavigationBar.fragment.xml, this time the button is found.image.pngPerform global search via Ctrl+Shift+F with key word “_templateEventHandlers.onBack“, no result.image.pngThen search “_templateEventHandlers” instead, this time TemplateAssembler-dbg.js is found.image.pngUnfortunately it is difficult to judge the type of _templateEventHandlers simply from context code as it is filled in a generic wayimage.png(3) Perform search on onBack instead, and the result is what I am looking for:image.pngSet a breakpoint and click back button to verify: breakpoint is triggered:image.pngSo the trick here is the keyword I am using to search in a tentative way.


first time search by _templateEventHandlers.onBack, no result

second time search by _templateEventHandlers, has result but not useful

third time search by onBack, done.




相关文章
|
6月前
|
XML 移动开发 开发框架
SAP Fiori Elements propertyAnnotations 举例讲解
SAP Fiori Elements propertyAnnotations 举例讲解
34 0
|
6月前
如何使用 Guided Development 给 Fiori Elements List Report 的工具栏添加自定义按钮试读版
如何使用 Guided Development 给 Fiori Elements List Report 的工具栏添加自定义按钮试读版
34 0
|
7月前
|
Web App开发 前端开发 开发者
SAP Fiori Launchpad 上看不到任何 tile 应该怎么办?
SAP Fiori Launchpad 上看不到任何 tile 应该怎么办?
23 0
SAP Fiori Elements应用里Back按钮的实现逻辑分析
SAP Fiori Elements应用里Back按钮的实现逻辑分析
SAP Fiori Elements应用里Back按钮的实现逻辑分析
SAP Fiori Elements save按钮的实现细节
SAP Fiori Elements save按钮的实现细节
129 0
SAP Fiori Elements save按钮的实现细节
SAP Fiori Elements edit按钮的实现细节
SAP Fiori Elements edit按钮的实现细节
SAP Fiori Elements edit按钮的实现细节
SAP Fiori Elements edit按钮的ABAP端实现细节
SAP Fiori Elements edit按钮的ABAP端实现细节
103 0
SAP Fiori Elements edit按钮的ABAP端实现细节
|
XML Web App开发 开发框架
深入理解 SAP Fiori Elements 工作原理系列之二:如何给 SAP Fiori Elements 应用添加自定义按钮
深入理解 SAP Fiori Elements 工作原理系列之二:如何给 SAP Fiori Elements 应用添加自定义按钮
深入理解 SAP Fiori Elements 工作原理系列之二:如何给 SAP Fiori Elements 应用添加自定义按钮
如何在 SAP Fiori Elements List Report 表格工具栏里增添新的自定义按钮
如何在 SAP Fiori Elements List Report 表格工具栏里增添新的自定义按钮
125 0
如何在 SAP Fiori Elements List Report 表格工具栏里增添新的自定义按钮
SAP Fiori Elements里Edit按钮点击之后的后台实现
SAP Fiori Elements里Edit按钮点击之后的后台实现
84 0
SAP Fiori Elements里Edit按钮点击之后的后台实现