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: docs/Annotation_Helper_dbec058.md
-16Lines changed: 0 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,22 +30,6 @@ The formatter functions can be used in binding expressions and `<template:if>` i
30
30
31
31
The following formatter functions exist:
32
32
33
-
-`createPropertySetting`: Creates a property setting which is either a constant value or a binding info object from the given parts and from the optional root formatter function. Each part can have one of the following types:
34
-
35
-
- boolean, number, undefined: The part is a constant value.
36
-
37
-
- string: The part is a data binding expression with complex binding syntax \(for example, as created by format\) and is parsed accordingly to create either a constant value or a binding info object. Proper backslash escaping must be used for constant values with curly braces.
38
-
39
-
- object: The part is a binding info object if it has a "path" or "parts" property, otherwise it is a constant value.
40
-
41
-
42
-
If a binding info object is not the only part and has a `parts` property itself, then it must have no other properties except `formatter`. This applies to expression bindings and data binding expressions that are created by `format`. If all parts are constant values, the resulting property setting is also a constant value computed by applying the root formatter function to the constant parts once. If at least one part is a binding info object, the resulting property setting is also a binding info object and the root formatter function will be applied again and again to the current values of all parts, no matter whether constant or variable.
43
-
44
-
> ### Note:
45
-
> The root formatter function should not rely on its `this` value because it depends on how the function is called.
46
-
>
47
-
> A single data binding expression can be given directly to `applySettings`; you do **not** need to call `this` function first.
48
-
49
33
-`format`: General purpose method that handles proper escaping and formatting of constant values and provides binding expressions with suitable types. `format` supports the following constructs:
50
34
51
35
- The *"14.4 Constant Expressions"* for *"edm:Bool"*, *"edm:Date"*, *"edm:DateTimeOffset"*, *"edm:Decimal"*, *"edm:Float"*, *"edm:Guid"*, *"edm:Int"*, *"edm:TimeOfDay"*.
@@ -226,37 +226,6 @@ QUnit.test("Should suppress rerendering when tooltip is set", async(assert) => {
226
226
});
227
227
```
228
228
229
-
`applyChanges()` enforces a synchronous rendering and **must not** be used in productive code.
230
-
231
-
**For test scenarios only**, you may use the test helper module **`sap/ui/qunit/utils/nextUIUpdate`** instead.
232
-
233
-
> ### Restriction:
234
-
> Using `nextUIUpdate` in combination with fake timers has some pitfalls. If fake timers are used, it is not possible to use `await`. In this case, you need to chain to the `nextUIUpdate` Promise and always use `clock.tick()` within the chaining in order to execute the rendering.
235
-
>
236
-
> The main difference to `applyChanges()` is that `nextUIUpdate()` does not synchronously trigger a re-rendering \(which by intention we wanted to get rid of\), but just waits for the next rendering cycle to complete. Due to this asynchronous nature, switching to it may be slightly more work than in other more straightforward cases.
237
-
238
-
As a replacement for `applyChanges()` **in tests only**, use:
239
-
240
-
```js
241
-
QUnit.test("Simple Component Instance",
242
-
asyncfunction(assert){
243
-
awaitnextUIUpdate();
244
-
...
245
-
});
246
-
247
-
// nextUIUpdate with fake timers
248
-
QUnit.test("Test with fake timers", function() {
249
-
this.clock=sinon.useFakeTimers();
250
-
251
-
// Using runAll is not always necessary but ensures, that no timeouts are left unprocessed
252
-
this.clock.runAll();
253
-
nextUIUpdate().then(() => {
254
-
this.clock.tick();
255
-
// Continue with your test
256
-
});
257
-
}
258
-
```
259
-
260
229
***
261
230
262
231
### Testing with Models
@@ -349,7 +318,7 @@ QUnit.test("Should do something with the model", async(assert) => {
Copy file name to clipboardExpand all lines: docs/How_to_Test_OpenUI5_Controls_with_QUnit_a6b0657.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,10 +142,6 @@ Using fake timers can be error-prone. Fake timers should only be used with care
142
142
143
143
- For using fake timers in combination with rendering: [Rendering and Re-rendering Controls Within Tests](Cookbook_for_Testing_Controls_with_QUnit_0ddcc60.md#loio0ddcc60b05ee40dea1a3be09e8fee8f7__section_REREN)
144
144
145
-
If you are using `sinon.qunit`, it will automatically use fake timers by itself. Fake timers will prevent any `setTimeout/setIntervall` function from being executed, unless you call `this.clock.tick(milliseconds)` in your test. This means that a Mock Server with auto-respond will not respond and OPA will not be able to wait for controls.
146
-
147
-
In addition, control events might be fired inside of a `setTimeout(, 0)`, so the event might not be triggered at all.
148
-
149
145
***
150
146
151
147
#### I've set a property on my control: Why aren't the changes in the DOM?
Copy file name to clipboardExpand all lines: docs/Legacy_Factories_Replacement_491bd9c.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
@@ -294,7 +294,7 @@ var oView = sap.ui.jsview({
294
294
</td>
295
295
<tdvalign="top">
296
296
297
-
For defining views, use `View.extend`. For loading and creating a view instance, use `View.create`. Refer also to the dedicated [Typed View](Typed_View_e6bb33d.md) documentation and the[code sample](https://sdk.openui5.org/entity/sap.ui.core.mvc.View/sample/sap.ui.core.sample.View.navigationTypedView).
297
+
For defining views, use `View.extend`. For loading and creating a view instance, use `View.create`. Refer also to the dedicated [Typed View](Typed_View_e6bb33d.md) documentation and the[code sample](https://sdk.openui5.org/entity/sap.ui.core.mvc.View/sample/sap.ui.core.sample.View.navigationTypedView).
298
298
299
299
```
300
300
@@ -449,7 +449,7 @@ var aControls = sap.ui.jsfragment({
0 commit comments