Skip to content

Commit 4e6cb25

Browse files
committed
add openui5 non-keyed for completeness
1 parent 3064694 commit 4e6cb25

File tree

14 files changed

+7648
-4225
lines changed

14 files changed

+7648
-4225
lines changed

frameworks/keyed/openui5/webapp/ControlRenderer.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
*/
44

55
sap.ui.define([], function () {
6-
6+
77
var ControlRenderer = {
88
apiVersion: 4
99
};
1010

1111
ControlRenderer.render = function (oRM, oControl) {
1212
oRM.openStart("div", oControl)
1313
oRM.openEnd()
14-
14+
1515
this.renderJumbotron(oRM, oControl);
1616
this.renderTable(oRM, oControl);
1717

@@ -50,7 +50,7 @@ sap.ui.define([], function () {
5050
oRM.openStart("div")
5151
oRM.class("row");
5252
oRM.openEnd();
53-
53+
5454
// action buttons
5555
[
5656
{id: "run", text: "Create 1,000 rows"},
@@ -68,21 +68,21 @@ sap.ui.define([], function () {
6868

6969
oRM.close("div");
7070
}
71-
71+
7272
ControlRenderer.renderButton = function (oRM, id, text) {
7373
// <div class="col-sm-6 smallpad">
7474
oRM.openStart("div");
7575
oRM.class("col-sm-6").class("smallpad");
7676
oRM.openEnd();
77-
77+
7878
// <button type="button" class="btn btn-primary btn-block" id="run" @click={{run}}>
7979
oRM.openStart("button", id);
8080
oRM.class("btn").class("btn-primary").class("btn-block");
8181
oRM.openEnd();
8282

8383
// Create 1,000 rows
8484
oRM.text(text);
85-
85+
8686
oRM.close("button");
8787

8888
oRM.close("div");
@@ -101,6 +101,7 @@ sap.ui.define([], function () {
101101
//rows
102102
oControl.getRows().forEach(row => {
103103
// <tr id={{this.id}} class={{this._class}}></tr>
104+
// difference to non-keyed - each row has an `id`
104105
oRM.openStart("tr", row.id + "");
105106
if (row.id === selected) {
106107
oRM.class("danger");

frameworks/non-keyed/openui5/README.md

Whitespace-only changes.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<title>OpenUI5</title>
7+
<script id="sap-ui-bootstrap"
8+
src="./dist/resources/sap-ui-boot.js"
9+
data-sap-ui-language="en"
10+
data-sap-ui-compat-version="edge"
11+
data-sap-ui-modules="[ui5/benchmark/Component-bundle]"
12+
data-sap-ui-on-init="ui5/benchmark/startUp@./dist/"
13+
data-sap-ui-preload-lib-css="sap.ui.core"
14+
data-sap-ui-async="true" async>
15+
</script>
16+
<style>
17+
.danger {
18+
background-color: red;
19+
}
20+
</style>
21+
</head>
22+
23+
<body class="container" id="content">
24+
<span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span>
25+
</body>
26+
<link href="/css/currentStyle.css" rel="stylesheet"/>
27+
28+
</html>

0 commit comments

Comments
 (0)