Install the Chrome extension "UI5 Inspector", detail see https://github.com/SAP/ui5-inspector
Change file tomcat_dire/conf/server.xml ( go to bottom), default like
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
change it to:
<Host name="localhost" appBase=""
unpackWARs="true" autoDeploy="true">
<Context path="/" docBase="/C:/Users/xxx/git" />
and adjust your index.hml location accordingly
<script id="sap-ui-bootstrap"
src="../../resources/sap-ui-core.js"
then start you application like: localhost:8080/youapp/index.html
For solve a issue, the normal process is that you investigate the issue, then change source code in Git, then do release build, then wait the source code transport from one system to another system, after the source code reach the system, then you do test to verify that the fix really work. If the fix not work,then repeat the process.
How can we easily check whether our solution can work ? The answer is: manually change the source code by browser debug tool.
We need first understand how SAPUI5 application run:
When an SAPUI5 application ( for the Fiori application, it is a Component) first time run, the browser will load the source code and execute it. When you return to the launchPad, the component instance will be deleted but the source code is still kept. The next time you run it, because the source code has been loaded, so the browser will directly create the new instance and run it.
Understand function format
After following code executed, the browser will put the function into the class prototype
sap.ca.scfld.md.controller.BaseFullscreenController.extend("sap.suite.ui.smartbusiness.drilldown.view.Drilldown",
{
_getChartPercentFormatter = function() {
......
}
}
So if you want to change the function _getChartPercentFormatter, you need paste following source code into Browser console window:
sap.suite.ui.smartbusiness.drilldown.view.Drilldown.prototype._getChartPercentFormatter = function() {
......
}
Choose "Develop tool" from menu, click the "Console" window, then directly paste you code, press 'Enter' to execute it
Choose "Developer"-->"Developer Toolbar" from the menu, then paste code, press 'Enter' to execute it.
Choose "F12 Developer Tool" from menu, click "Console" window, paste code, then press green triangle button to execute it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
32 | |
24 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |