You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ex0/readme.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,10 +54,10 @@ Finally, we will serve the project using ui5.
54
54
- In the terminal or command prompt at our project's root directory, run the following command:
55
55
56
56
```bash
57
-
ui5 serve
57
+
npm start
58
58
```
59
59
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! 🚀
Copy file name to clipboardExpand all lines: ex1/readme.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,7 @@ This XML view defines the user interface for a screen in our UI5 application. Th
90
90
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`.
91
91
###### view/Mountains.view.xml
92
92
```xml
93
+
<f:content>
93
94
<mdc:Table
94
95
id="table"
95
96
header="Mountains"
@@ -99,42 +100,43 @@ Below is the code we can add to the content aggregation of the DynamicPage in th
99
100
filter="filterbar"
100
101
showRowCount="false"
101
102
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
+
}">
107
108
<mdct:Column
108
109
propertyKey="name"
109
110
header="Name">
110
-
<Texttext="{mountains>name}"/>
111
+
<Texttext="{mountains>name}"/>
111
112
</mdct:Column>
112
113
<mdct:Column
113
114
propertyKey="height"
114
115
header="Height">
115
-
<Texttext="{path: 'mountains>height'}"/>
116
+
<Texttext="{path: 'mountains>height'}"/>
116
117
</mdct:Column>
117
118
<mdct:Column
118
119
propertyKey="range"
119
120
header="Range">
120
-
<Texttext="{mountains>range}"/>
121
+
<Texttext="{mountains>range}"/>
121
122
</mdct:Column>
122
123
<mdct:Column
123
124
propertyKey="first_ascent"
124
125
header="First Ascent">
125
-
<Texttext="{mountains>first_ascent}"/>
126
+
<Texttext="{mountains>first_ascent}"/>
126
127
</mdct:Column>
127
128
<mdct:Column
128
129
propertyKey="countries"
129
130
header="Countries">
130
-
<Texttext="{mountains>countries}"/>
131
+
<Texttext="{mountains>countries}"/>
131
132
</mdct:Column>
132
133
<mdct:Column
133
134
propertyKey="parent_mountain"
134
135
header="Parent Mountain">
135
-
<Texttext="{mountains>parent_mountain}"/>
136
+
<Texttext="{mountains>parent_mountain}"/>
136
137
</mdct:Column>
137
138
</mdc:Table>
139
+
</f:content>
138
140
```
139
141
> ℹ️ 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.
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.
@@ -65,6 +66,7 @@ To add a FilterBar to the XML view, we can use the [`sap.ui.mdc.FilterBar`](http
65
66
66
67
</mdc:dependents>
67
68
</mdc:FilterBar>
69
+
</f:DynamicPageHeader>
68
70
```
69
71
70
72
>⚠️ 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.
0 commit comments