Afterwars you need call the method in the init() function of the component. No reload the app and you will find the new button in the top right corner. Pressing will switch the theme to dark or back to light theme.
“With UI5 Web Components, developers can build the core logic of the application using these popular web frameworks, while using UI5 Web Components as the visual elements (controls).
Each of these web frameworks have different ways of handling data layer, persistence, binding, and integration with APIs, etc. but the nice thing about web components is that is integrates easily, regardless of the framework.”
3. Select List Report Object Page 4. Select Connect to an OData Service as Data source and enter as URL http://localhost:4004/browse 5. Choose Books as the Main entity and texts as Navigation entity 6. Complete the mandatory information module name (e.g. bookshop) and Project folder path for storing your app. Of course, you can also fill in the optional information.
Step 3: Make changes in package.json and ui5.yaml required for using OpenUI5
package.json
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"name": "fiorielements_openui5",
"version": "0.0.1",
"private": true,
"sapux": true,
"description": "A Fiori application.",
"keywords": [
"ui5",
"openui5",
"sapui5"
],
"main": "webapp/index.html",
"scripts": {
"start": "fiori run --open index.html",
"start-local": "fiori run --config ./ui5-local.yaml --open index.html",
"build": "ui5 build -a --clean-dest --include-task=generateManifestBundle generateCachebusterInfo",
"deploy": "fiori add deploy-config"
},
"devDependencies": {
"@sap/ux-specification": "latest",
"@sap/ux-ui5-tooling": "1",
"@ui5/cli": "2.5.0",
"@ui5/fs": "2.0.1",
"@ui5/logger": "2.0.0"
},
"ui5": {
"dependencies": [
"@sap/ux-ui5-tooling",
"@sap/open.fe"
]
},
"dependencies": {
"@sap/open.fe": "1.85.0"
}
}
ui5.yaml
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
specVersion:'2.2'
metadata:
name:'fiorielements_openui5'
type:application
framework:
name:OpenUI5
version:"1.85.0"
libraries:
-name:sap.m
-name:sap.ui.core
-name:sap.uxap
-name:themelib_sap_fiori_3
server:
customMiddleware:
-name:fiori-tools-proxy
afterMiddleware:compression
configuration:
ignoreCertError:false# If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
backend:
-path:/browse
url:http://localhost:4004
-name:fiori-tools-appreload
afterMiddleware:compression
configuration:
port:35729
path:webapp
Step 4: Run the V4 application
1
2
3
cd~/projects/fiorielements_openui5
npm i
npm start
Now http://localhost:8080/index.html should be opened in your browser. “Note: Clicking on the Go button in List Report application might request user and password. Please enter user alice, no password.” Finally I got my list items.