Skip to content

Commit 1ef17f2

Browse files
authoredJun 4, 2024··
Merge pull request #11 from SAP-samples/updates-for-ui5con-2024
Updates for ui5con 2024
2 parents 76308d5 + 2f85e96 commit 1ef17f2

File tree

9 files changed

+23
-13
lines changed

9 files changed

+23
-13
lines changed
 

Diff for: ‎ex0/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

Diff for: ‎ex0/readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ Finally, we will serve the project using ui5.
5454
- In the terminal or command prompt at our project's root directory, run the following command:
5555

5656
```bash
57-
ui5 serve
57+
npm start
5858
```
5959

60-
This command will start a development server for our project. You can access the development server at https://localhost:8080 and check out the running application! 🚀
60+
This command will start a development server for our project. You can access the development server at http://localhost:8080/index.html and check out the running application! 🚀
6161

6262
![Exercise 0 Result](ex0.png)
6363

Diff for: ‎ex1/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

Diff for: ‎ex1/readme.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ This XML view defines the user interface for a screen in our UI5 application. Th
9090
Below is the code we can add to the content aggregation of the DynamicPage in the XML view. It includes a table with columns for name, height, range, first ascent, countries, and parent mountain, along with the data bindings. The corresponding model is automatically generated based on our sample data via the `manifest.json`.
9191
###### view/Mountains.view.xml
9292
```xml
93+
<f:content>
9394
<mdc:Table
9495
id="table"
9596
header="Mountains"
@@ -99,42 +100,43 @@ Below is the code we can add to the content aggregation of the DynamicPage in th
99100
filter="filterbar"
100101
showRowCount="false"
101102
delegate="{
102-
name: 'mdc/tutorial/delegate/JSONTableDelegate',
103-
payload: {
104-
bindingPath: 'mountains>/mountains'
105-
}
106-
}">
103+
name: 'mdc/tutorial/delegate/JSONTableDelegate',
104+
payload: {
105+
bindingPath: 'mountains>/mountains'
106+
}
107+
}">
107108
<mdct:Column
108109
propertyKey="name"
109110
header="Name">
110-
<Text text="{mountains>name}"/>
111+
<Text text="{mountains>name}" />
111112
</mdct:Column>
112113
<mdct:Column
113114
propertyKey="height"
114115
header="Height">
115-
<Text text="{path: 'mountains>height'}"/>
116+
<Text text="{path: 'mountains>height'}" />
116117
</mdct:Column>
117118
<mdct:Column
118119
propertyKey="range"
119120
header="Range">
120-
<Text text="{mountains>range}"/>
121+
<Text text="{mountains>range}" />
121122
</mdct:Column>
122123
<mdct:Column
123124
propertyKey="first_ascent"
124125
header="First Ascent">
125-
<Text text="{mountains>first_ascent}"/>
126+
<Text text="{mountains>first_ascent}" />
126127
</mdct:Column>
127128
<mdct:Column
128129
propertyKey="countries"
129130
header="Countries">
130-
<Text text="{mountains>countries}"/>
131+
<Text text="{mountains>countries}" />
131132
</mdct:Column>
132133
<mdct:Column
133134
propertyKey="parent_mountain"
134135
header="Parent Mountain">
135-
<Text text="{mountains>parent_mountain}"/>
136+
<Text text="{mountains>parent_mountain}" />
136137
</mdct:Column>
137138
</mdc:Table>
139+
</f:content>
138140
```
139141
> ℹ️ Pay attention to how the controls are specified. All the MDCs included in the XML view will initially appear on the screen without any additional personalization. While this may seem superfluous when also providing the control creation method in the delegate, it allows us to establish a default without any hassle. Alternatively, we could opt to not provide any controls here and add them later through personalization.
140142

Diff for: ‎ex2/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

Diff for: ‎ex2/readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default JSONFilterBarDelegate
4444
To add a FilterBar to the XML view, we can use the [`sap.ui.mdc.FilterBar`](https://sdk.openui5.org/api/sap.ui.mdc.FilterBar) control. Setting the previously created delegate makes sure, that the FilterBar can deal with the specific JSON data we are facing. Place the FilterBar inside of the DynamicPageHeader.
4545
###### view/Mountains.view.xml
4646
```xml
47+
<f:DynamicPageHeader pinnable="true">
4748
<mdc:FilterBar id="filterbar" delegate="{name: 'mdc/tutorial/delegate/JSONFilterBarDelegate'}"
4849
p13nMode = "Item,Value">
4950
<mdc:basicSearchField>
@@ -65,6 +66,7 @@ To add a FilterBar to the XML view, we can use the [`sap.ui.mdc.FilterBar`](http
6566

6667
</mdc:dependents>
6768
</mdc:FilterBar>
69+
</f:DynamicPageHeader>
6870
```
6971

7072
>⚠️ Like columns in the MDC table, the filter items are used for UI adaptation functionalities. Hence, do not change them, manually or dynamically, or use bindings to prevent undesired effects.

Diff for: ‎ex3/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

Diff for: ‎ex4/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

Diff for: ‎ex5/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

0 commit comments

Comments
 (0)
Please sign in to comment.