Skip to content

Commit 8729a63

Browse files
committed
OpenUI5 Documentation Update 06.02.2024
1 parent 50bdcff commit 8729a63

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

docs/Cookbook_for_Testing_Controls_with_QUnit_0ddcc60.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ We use `clock.tick` to trigger the server response. If you didn't do this, the t
309309
310310
```js
311311
// "Label" required from module "sap/m/Label"
312-
"nextUIUpdate" required from module "sap/ui/qunit/utils/nextUIUpdate"
312+
// "nextUIUpdate" required from module "sap/ui/qunit/utils/nextUIUpdate"
313313

314314
//Your test:
315315
QUnit.test("Should do something with the model", async(assert) => {

docs/Legacy_Factories_Replacement_491bd9c.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ view on: [demo kit nightly build](https://sdk.openui5.org/nightly/#/topic/491bd9
1212

1313
Overview of the replacement of global functions with the factory functions
1414

15-
The AMD module syntax already avoids Globals and enforces the strict dependency declaration. The following table shows how APIs which use synchronous requests to fetch modules or resources internally, can be replaced with asynchronous alternatives. The W3C has already deprecated the use of synchronous requests in the browser main thread, so this replacement prepares your applications for the removal of synchronous requests.
15+
The AMD module syntax already avoids Globals and enforces the strict dependency declaration. The following table shows how APIs which use synchronous requests to fetch modules or resources internally, can be replaced with asynchronous alternatives. The WHATWG has already deprecated the use of synchronous requests in the browser main thread, so this replacement prepares your applications for the removal of synchronous requests.
1616

17-
The OpenUI5 framework by default uses synchronous requests internally in several places. Most have already been replaced by asynchronous alternatives, or prepared to exchange the synchronous behaviour shown below. The asynchronous adoption starts from the beginning with the bootstrap script tag, where the `async` configuration parameter should be set to `true`. Applications can register an event callback via [`sap.ui.getCore()#attachInit`](https://sdk.openui5.org/api/sap.ui.core.Core/methods/attachInit). . The examples below show only the most frequently used synchronous APIs. There are more of these APIs, and most often the asynchronous alternatives return a `Promise` that can be used to retrieve the former return value.
17+
The OpenUI5 framework by default uses synchronous requests internally in several places. Most have already been replaced by asynchronous alternatives, or prepared to exchange the synchronous behaviour shown below. The asynchronous adoption starts from the beginning with the bootstrap script tag, where the `async` configuration parameter should be set to `true`. The examples below show only the most frequently used synchronous APIs. There are more of these APIs, and most often the asynchronous alternatives return a `Promise` that can be used to retrieve the former return value.
1818

1919

2020
<table>
@@ -57,7 +57,7 @@ var oComponentInstance = sap.ui.component({
5757

5858
```
5959
60-
sap.ui.require(['sap/ui/core/Component'], (Component)=> {
60+
sap.ui.require(["sap/ui/core/Component"], (Component)=> {
6161
6262
Component.create({
6363
@@ -107,7 +107,7 @@ var oComponentClass = sap.ui.component.load({
107107

108108
```
109109
110-
sap.ui.require(['sap/ui/core/Component'], (Component) => {
110+
sap.ui.require(["sap/ui/core/Component"], (Component) => {
111111
112112
Component.load({
113113
@@ -141,7 +141,7 @@ var oComponentInstance = sap.ui.component("my-comp-id");
141141

142142
```
143143
144-
sap.ui.require(['sap/ui/core/Component'], (Component) => {
144+
sap.ui.require(["sap/ui/core/Component"], (Component) => {
145145
146146
var oComponentInstance = Component.get("my-comp-id");
147147
@@ -182,7 +182,7 @@ jQuery.sap.resources({
182182
183183
// sap/ui/Resources -> sap/base/i18n/ResourceBundle
184184
185-
sap.ui.require(['sap/base/i18n/ResourceBundle'], (Resource) => {
185+
sap.ui.require(["sap/base/i18n/ResourceBundle"], (Resource) => {
186186
187187
ResourceBundle.create({
188188
@@ -226,7 +226,7 @@ var oView = sap.ui.view({
226226

227227
```
228228
229-
sap.ui.require(['sap/ui/core/mvc/View'], (View) => {
229+
sap.ui.require(["sap/ui/core/mvc/View"], (View) => {
230230
231231
View.create({
232232
@@ -262,7 +262,7 @@ var oView = sap.ui.xmlview({
262262

263263
```
264264
265-
sap.ui.require(['sap/ui/core/mvc/XMLView'], (XMLView) => {
265+
sap.ui.require(["sap/ui/core/mvc/XMLView"], (XMLView) => {
266266
267267
XMLView.create({
268268
@@ -298,7 +298,7 @@ For defining views, use `View.extend`. For loading and creating a view instance,
298298

299299
```
300300
301-
sap.ui.define(['sap/ui/core/mvc/View', 'sap/m/Panel'], function(View, Panel){
301+
sap.ui.define(["sap/ui/core/mvc/View", "sap/m/Panel"], function(View, Panel){
302302
303303
return View.extend("my.View", {
304304
@@ -326,7 +326,7 @@ sap.ui.define(['sap/ui/core/mvc/View', 'sap/m/Panel'], function(View, Panel){
326326
```
327327

328328
```
329-
sap.ui.require(['sap/ui/core/mvc/View'], (View) => {
329+
sap.ui.require(["sap/ui/core/mvc/View"], (View) => {
330330
View.create({
331331
viewName: "module:my/View"
332332
}).then((oView) => { ... });
@@ -359,7 +359,7 @@ var oController = sap.ui.controller({ ... });
359359
To define an `sap/ui/core/mvc/Controller` subclass, you can simply extend it:
360360

361361
```
362-
sap.ui.require(['sap/ui/core/mvc/Controller'], (Controller) => {
362+
sap.ui.require(["sap/ui/core/mvc/Controller"], (Controller) => {
363363
return Controller.extend("my.sample.ControllerClass", {
364364
/* lifecycle hooks, controller methods etc. */
365365
onInit: function() { ... }
@@ -371,7 +371,7 @@ To manually instantiate a Controller class, you can use the `Controller.create()
371371

372372
```
373373
374-
sap.ui.require(['sap/ui/core/mvc/Controller'], (Controller) => {
374+
sap.ui.require(["sap/ui/core/mvc/Controller"], (Controller) => {
375375
376376
Controller.create({
377377
@@ -406,7 +406,7 @@ var aControls = sap.ui.extensionpoint( ... );
406406

407407
```
408408
409-
sap.ui.require(['sap/ui/core/ExtensionPoint'], (ExtensionPoint) => {
409+
sap.ui.require(["sap/ui/core/ExtensionPoint"], (ExtensionPoint) => {
410410
411411
ExtensionPoint.load({
412412
@@ -463,7 +463,7 @@ var aControls = sap.ui.xmlfragment({
463463
If you're instantiating your fragment inside a controller which extends `sap.ui.core.mvc.Controller`, you can use the `loadFragment` function:
464464

465465
```
466-
sap.ui.define(['sap/ui/core/mvc/Controller'], (Controller) => {
466+
sap.ui.define(["sap/ui/core/mvc/Controller"], (Controller) => {
467467
return Controller.extend("my.MyController", {
468468
469469
onInit: function() {
@@ -483,12 +483,12 @@ If you're instantiating your fragment outside a controller, you can use the stat
483483

484484
```
485485
sap.ui.require([
486-
'sap/ui/core/Component',
487-
'sap/ui/core/Fragment'
486+
"sap/ui/core/Component",
487+
"sap/ui/core/Fragment"
488488
], (Component, Fragment) => {
489489
...
490490
491-
// 'oPage' is an exemplary sap.m.Page control
491+
// "oPage" is an exemplary sap.m.Page control
492492
const oComponent = Component.getOwnerComponentFor(oPage);
493493
494494
oComponent.runAsOwner(function() {
@@ -530,7 +530,7 @@ var oVersionInfo = sap.ui.getVersionInfo();
530530

531531
```
532532
533-
sap.ui.require(['sap/ui/core/VersionInfo'], (VersionInfo) => {
533+
sap.ui.require(["sap/ui/core/VersionInfo"], (VersionInfo) => {
534534
535535
VersionInfo.load({
536536

0 commit comments

Comments
 (0)