Skip to content

Commit 3ec5658

Browse files
authored
fix: note for flex-managed properties (#10)
1 parent ed4f0ca commit 3ec5658

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ex1/readme.md

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ JSONTableDelegate.updateBindingInfo = (table, bindingInfo) => {
6060

6161
export default JSONTableDelegate
6262
```
63+
64+
>⚠️ The `fetchProperties` is a special function as its return value is used for further UI adaptation functionalities. Due to this, the result of this function must be kept stable throughout the lifecycle of your application. Any changes of the returned values might result in undesired effects. As we're using a PropertyInfo at this point, be aware to keep it stable throughout the lifecycle of your application.
65+
6366
The PropertyInfo provides all necessary metadata for the MDC Table to function. Take a look at this excerpt of the `JSONPropertyInfo.ts` file to understand how the two properties, `name` and `height` are defined.
6467
###### model/metadata/JSONPropertInfo.ts
6568
```js
@@ -135,6 +138,8 @@ Below is the code we can add to the content aggregation of the DynamicPage in th
135138
```
136139
> ℹ️ 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.
137140
141+
>⚠️ The columns we define in our table are used for UI adaptation functionalities like the aforementioned `fetchProperties` function. Hence, the values must again be kept stable throughout the lifecycle of your application to prevent undesired effects. For this reason, using bindings or changing the aggregation's value dynamically through controller code is not advised.
142+
138143
Run the application and see how, with just a few lines of code we added, we get a personalizable table that shows the properties of our JSON data! 😱
139144

140145
![Exercise 1 Result](ex1.png)

ex2/readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ To add a FilterBar to the XML view, we can use the [`sap.ui.mdc.FilterBar`](http
6767
</mdc:FilterBar>
6868
```
6969

70+
>⚠️ 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.
71+
7072
Use the filter association of the table to connect it to the FilterBar and add the fields we would like to search in the payload. For this, add the `searchKeys` property to the delegate payload.
7173
###### view/Mountains.view.xml
7274
```xml

0 commit comments

Comments
 (0)