Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week 1+2+3 #24

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions webapp/controller/Main.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sap.ui.define([
"./BaseController"
], function (BaseController) {
"use strict";

return BaseController.extend("ui5.challenge.controller.Main", {
});
});
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
appDescription=ui5-challenge
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
23 changes: 21 additions & 2 deletions webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,22 @@
"controlId": "app",
"clearControlAggregation": false
},
"routes": [],
"targets": {}
"routes": [
{
"pattern": "",
"name": "main",
"target": [
"main"
]
}
],
"targets": {
"main": {
"viewName": "Main",
"viewId": "main",
"viewLevel": 1
}
}
},
"rootView": {
"viewName": "ui5.challenge.view.App",
Expand All @@ -62,6 +76,11 @@
"settings": {
"bundleName": "ui5.challenge.i18n.i18n"
}
},
"data": {
"type": "sap.ui.model.json.JSONModel",
"uri": "model/data.json",
"preload": true
}
}
}
Expand Down
17 changes: 17 additions & 0 deletions webapp/model/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"buttonText": "Hello World !",
"items": [
{
"title": "first",
"counter": 1
},
{
"title": "second",
"counter": 2
},
{
"title": "third",
"counter": 3
}
]
}
14 changes: 14 additions & 0 deletions webapp/view/Main.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<mvc:View xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m">
<VBox>
<Button id="mainButton" text="{data>/buttonText}" />
<List
items="{
path: 'data>/items'
}" >
<StandardListItem
title="{data>title}"
counter="{data>counter}"
/>
</List>
</VBox>
</mvc:View>