Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
10,468 changes: 10,436 additions & 32 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webapp/controller/BaseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sap.ui.define([
this.getRouter().navTo(psTarget, pmParameters, pbReplace);
},
getRouter: function () {
return UIComponent.getRouterFor(this);
return this.getOwnerComponent().getRouter();
},
onPress: function () {

Expand Down
44 changes: 44 additions & 0 deletions webapp/controller/Detail.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
sap.ui.define([
"ui5/challenge/controller/BaseController",
"sap/m/Dialog",
"sap/m/Button",
"sap/m/List",
"sap/m/StandardListItem"
],
function (BaseController, Dialog, Button, List, StandardListItem) {
"use strict";
return BaseController.extend("webapp.controller.Detail", {

navButtonPress: function () {
this.navTo("Main")
},
onPressDialogButton: function() {
if (!this.oDefaultDialog) {
this.oDefaultDialog = new Dialog({
id: "myDialog",
title: "myDialog",
content: new List({
items: {
path: "/Stores",
template: new StandardListItem({
title: "{Name}"
})
}
}),
beginButton: new Button({
text: "OK",
press: function () {
this.oDefaultDialog.close();
}.bind(this)
})
});

// to get access to the controller's model
this.getView().addDependent(this.oDefaultDialog);
}

this.oDefaultDialog.open();
}
});
}
);
12 changes: 12 additions & 0 deletions webapp/controller/Main.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sap.ui.define([
"ui5/challenge/controller/BaseController"
],
function (BaseController) {
"use strict";
return BaseController.extend("ui5.challenge.controller.List", {
onPressDetail: function () {
this.navTo("Detail")
}
});
}
);
6 changes: 6 additions & 0 deletions webapp/i18n/i18n.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#XMSG
appTitle=ui5-challenge
#YDES
appDescription=ui5-challenge

mainTitleText=wdi5 rocks
10 changes: 8 additions & 2 deletions 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 All @@ -10,11 +10,17 @@
data-sap-ui-resourceroots='{
"ui5.challenge": "./"
}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted"
></script>
<script>
sap.ui.getCore().attachInit(function () {
new sap.ui.core.ComponentContainer({
name: "ui5.challenge",
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
Expand Down
39 changes: 37 additions & 2 deletions webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"applicationVersion": {
"version": "0.0.1"
},
"dataSources": {
"JSONmodel": {
"uri": "models/supportModel.json",
"type": "JSON"
}
},
"title": "{{appTitle}}",
"description": "{{appDescription}}"
},
Expand Down Expand Up @@ -47,8 +53,34 @@
"controlId": "app",
"clearControlAggregation": false
},
"routes": [],
"targets": {}
"routes": [
{
"pattern": "",
"name": "Main",
"target":[
"Main"
]
},
{
"pattern": "RouteDetail",
"name": "Detail",
"target":[
"detail"
]
}
],
"targets": {
"Main":{
"viewName": "Main",
"viewId": "Main",
"viewLevel": 1
},
"detail":{
"viewName": "Detail",
"viewId": "Detail",
"viewLevel": 2
}
}
},
"rootView": {
"viewName": "ui5.challenge.view.App",
Expand All @@ -57,6 +89,9 @@
"id": "app"
},
"models": {
"": {
"dataSource": "JSONmodel"
},
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
Expand Down
Loading