Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
311 changes: 180 additions & 131 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@wdio/local-runner": "^7.19.7",
"@wdio/mocha-framework": "^7.19.7",
"@wdio/spec-reporter": "^7.19.7",
"chromedriver": "^101.0.0",
"chromedriver": "^103.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"wait-on": "^6.0.1",
Expand Down
29 changes: 29 additions & 0 deletions webapp/controller/Detail.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/Dialog",
"sap/m/Button"
], function(
Controller,
Dialog,
Button
) {
"use strict";

return Controller.extend("ui5.challenge.controller.Detail", {
onOpenDialog: function(oEvent) {
if (!this.oDialog) {
this.oDialog = new Dialog({
title: "Test dialog",
id:"myDialog",
beginButton: new Button({
text: "close",
press: function() {
this.oDialog.close()
}.bind(this)
})
}).addStyleClass("myDialog")
}
this.oDialog.open()
}
});
});
13 changes: 13 additions & 0 deletions webapp/controller/Main.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sap.ui.define([
"ui5/challenge/controller/BaseController"
], function(
BaseController
) {
"use strict";

return BaseController.extend("ui5.challenge.controller.Main", {
onItem1Press: function(oEvent) {
this.getOwnerComponent().getRouter().navTo("RouteDetail")
}
});
});
2 changes: 2 additions & 0 deletions webapp/i18n/i18n.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appTitle=ui5-challenge
mainTitleText=wdi5 rocks
2 changes: 1 addition & 1 deletion webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>title</title>
<title>ui5-challenge</title>

<script
id="sap-ui-bootstrap"
Expand Down
25 changes: 23 additions & 2 deletions webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,29 @@
"controlId": "app",
"clearControlAggregation": false
},
"routes": [],
"targets": {}
"routes": [{
"name": "main",
"pattern": "",
"target":["main"]
},
{
"name": "RouteDetail",
"pattern": "RouteDetail",
"target": "detail"
}
],
"targets": {
"main": {
"id": "main",
"viewName": "Main",
"viewType": "XML"
},
"detail": {
"id": "detail",
"viewName": "Detail",
"viewType": "XML"
}
}
},
"rootView": {
"viewName": "ui5.challenge.view.App",
Expand Down
2 changes: 1 addition & 1 deletion webapp/view/App.view.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<mvc:View xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m">
<Shell id="shell">
<Shell id="shell" title="ui5_challenge">
<App id="app" />
</Shell>
</mvc:View>
23 changes: 23 additions & 0 deletions webapp/view/Detail.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<mvc:View
controllerName="ui5.challenge.controller.Detail"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:c="sap.ui.core"
displayBlock="true"
height="100%"
busyIndicatorDelay="0"
>
<Page
title="Detail"
showNavButton="true"
>
<content>
<Button
id="dialogButton"
text="Open dialog"
press=".onOpenDialog"
>
</Button>
</content>
</Page>
</mvc:View>
39 changes: 39 additions & 0 deletions webapp/view/Main.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<mvc:View
controllerName="ui5.challenge.controller.Main"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:c="sap.ui.core"
displayBlock="true"
height="100%"
busyIndicatorDelay="0"
>
<Page
title="{i18n>mainTitleText}"
>
<content>
<Button
id="mainButton"
text="MainButton"
>
</Button>
<List>
<items>
<StandardListItem
title="item1"
type="Navigation"
press=".onItem1Press"
id="myControl"
/>
<StandardListItem
title="item2"
/>
<StandardListItem
title="item3"
/>
</items>
</List>

</content>

</Page>
</mvc:View>