Skip to content

Commit

Permalink
OpenUI5 Documentation Update 28.02.2024
Browse files Browse the repository at this point in the history
  • Loading branch information
openui5bot committed Feb 28, 2024
1 parent 89a955f commit a4bcc2f
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/Data_Binding_68b9644.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ There are also internal data sources that are defined in the app for specific pu

- **View models** can be, for example, JSON models that communicate with a corresponding JSON object. JSON data can also be edited in the app, but they are not stored - as soon as you refresh the browser or restart the app, the changes are reset.

- A JSON model can be used together with an `sap/ui/Device` module to create a **device model** that contains device-specific settings. For an example, see our Walkthrough tutorial, [Step 35: Device Adaptation](Step_35_Device_Adaptation_d63a15e.md).
- A JSON model can be used together with the `sap/ui/Device` module to create a **device model** that contains device-specific settings. For an example, see our Walkthrough tutorial, [Step 35: Device Adaptation](Step_35_Device_Adaptation_d63a15e.md).


Most of the models are client-side models. This means that all data is initially loaded to the model when the app is started. All actions performed on the data are only executed on the client, and are only sent back to the data source when this is triggered by the app. Client-side models are therefore only recommended for small data sets.
Expand Down
9 changes: 5 additions & 4 deletions docs/ECMAScript_Support_0cb44d7.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Or, for still using `await`, you could wrap your async function:
> text: "Press me",
> press: () => {
> (async () => { // async wrapper
> await doSomething() // do something async, e.g. request data and wait for it...
> await doSomething(); // do something async, e.g. request data and wait for it...
> console.log("Data received!");
> })()
> }
Expand Down Expand Up @@ -209,7 +209,8 @@ Do **not** use a spread element as a parameter in the context of the `sap.ui.def
> "sap/ui/core/mvc/Controller",
> "sap/ui/mode/Filter",
> "sap/ui/model/FilterOperator",
> "sap/ui/model/json/JSONModel"];
> "sap/ui/model/json/JSONModel"
> ];
> sap.ui.define([
> ...dependencies
> ], (Controller, Filter, FilterOperator, JSONModel) => {
Expand Down Expand Up @@ -240,7 +241,7 @@ The usage of template literals with one or more expressions in the context of th
> ```
> // Do NOT use template literals with one or more
> // expressions inside an sap.ui.define or sap.ui.require call.
> const sLibName = `ui/core`
> const sLibName = `ui/core`;
>
> sap.ui.define([
> `sap/${sLibName}/mvc/Controller`
Expand Down Expand Up @@ -482,7 +483,7 @@ Do **not** use a template literal with one or more expressions for the library n
> ], (Library) => {
> "use strict";
> const thisLib = Library.init({
> name: "my.${libraryName}"
> name: `my.${libraryName}`
> });
> });
> ```
Expand Down
2 changes: 1 addition & 1 deletion docs/Initialization_and_Read_Requests_fccfb2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For the absolute property bindings of singletons, see [Absolute Property Binding

A relative list or context binding creates a data service request once it has a context in the following cases:

- The relative binding has parameters, such as OData query options like `$select`, or binding-specific parameters with a name starting with `$$` see the *Parameters* subsection below. If you want a relative binding to create its own data service request, use the binding-specific parameter `$$ownRequest`.
- The relative binding has parameters, such as OData query options like `$select`, or binding-specific parameters with a name starting with `$$`; for more information, see [Parameters](Parameters_1ab4f62.md). If you want a relative binding to create its own data service request, use the binding-specific parameter `$$ownRequest`.

- You specify a dynamic filter or dynamic sorter for a list binding and use `sap.ui.model.odata.OperationMode.Server`, see sections [Filtering](Filtering_5338bd1.md) and [Sorting](Sorting_d2ce3f5.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/Mock_Server_69d3cbd.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ For more information on the OData V2 mock server, see the topics given below.

### OData V4 Mock Server

The mock server functionality for OData V4 is included with CAP Node.js. For more information, see [https://cap.cloud.sap/docs/get-started/grow-as-you-go\#with-mocks](https://cap.cloud.sap/docs/get-started/grow-as-you-go#with-mocks).
The mock server functionality for OData V4 is included with CAP Node.js. For more information, see [https://cap.cloud.sap/docs/guides/using-services\#local-mocking](https://cap.cloud.sap/docs/guides/using-services#local-mocking).

- **[OData Features Supported by the OData V2 Mock Server](OData_Features_Supported_by_the_OData_V2_Mock_Server_3459c37.md "List of OData version 2.0 features supported or not supported by the mock server")**
List of OData version 2.0 features supported or not supported by the mock server
Expand Down
13 changes: 7 additions & 6 deletions docs/Step_1_Ready_851bde4.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ You can view and download all files at [Quick Start - Step 1](https://sdk.openui
<title>Quickstart Tutorial</title>
<script id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-libs="sap.m"
data-sap-ui-resourceroots='{"ui5.quickstart": "./"}'
data-sap-ui-onInit="module:ui5/quickstart/index"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true">
data-sap-ui-compat-version="edge"
data-sap-ui-async="true"
data-sap-ui-on-init="module:ui5/quickstart/index"
data-sap-ui-resource-roots='{
"ui5.quickstart": "./"
}'>
</script>
</head>
<body class="sapUiBody" id="content"></body>
Expand Down Expand Up @@ -98,7 +99,7 @@ You can view and download all files at [Quick Start - Step 1](https://sdk.openui
new Button({
text: "Ready...",
press: function () {
press() {
MessageToast.show("Hello World!");
}
}).placeAt("content");
Expand Down
16 changes: 8 additions & 8 deletions docs/Step_2_Steady_128214a.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ You can view and download all files at [Quick Start - Step 2](https://sdk.openui
```js
sap.ui.define([
"sap/ui/core/mvc/XMLView"
], function (XMLView) {
], (XMLView) => {
"use strict";

XMLView.create({viewName: "Quickstart.App"}).then(function (oView) {
oView.placeAt("content");
});
XMLView.create({
viewName: "ui5.quickstart.App"
}).then((oView) => oView.placeAt("content"));
});
```

Expand All @@ -60,7 +60,7 @@ Similar to the step before, the view is placed in the element with the `content`

```xml
<mvc:View
controllerName="Quickstart.App"
controllerName="ui5.quickstart.App"
displayBlock="true"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc">
Expand Down Expand Up @@ -96,11 +96,11 @@ We outsource the controller logic to an app controller. The `.onPress` event now
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/MessageToast"
], function (Controller, MessageToast) {
], (Controller, MessageToast) => {
"use strict";

return Controller.extend("Quickstart.App", {
onPress: function () {
return Controller.extend("ui5.quickstart.App", {
onPress() {
MessageToast.show("Hello App!");
}
});
Expand Down
25 changes: 13 additions & 12 deletions docs/Step_3_Go_073d107.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ You can view and download all files at [Quick Start - Step 3](https://sdk.openui
<title>Quickstart Tutorial</title>
<script id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-libs="sap.m, sap.ui.layout, sap.tnt"
data-sap-ui-resourceroots='{"ui5.quickstart": "./"}'
data-sap-ui-onInit="module:ui5/quickstart/index"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true">
data-sap-ui-compat-version="edge"
data-sap-ui-async="true"
data-sap-ui-on-init="module:ui5/quickstart/index"
data-sap-ui-resource-roots='{
"ui5.quickstart": "./"
}'>
</script>
</head>
<body class="sapUiBody" id="content"></body>
Expand All @@ -69,7 +70,7 @@ Let's spice up our app by adding some more UI controls. We add two more librarie

```xml
<mvc:View
controllerName="Quickstart.App"
controllerName="ui5.quickstart.App"
displayBlock="true"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
Expand Down Expand Up @@ -140,16 +141,16 @@ sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/MessageToast",
"sap/ui/model/json/JSONModel"
], function (Controller, MessageToast, JSONModel) {
], (Controller, MessageToast, JSONModel) => {
"use strict";

return Controller.extend("Quickstart.App", {
onPress: function () {
return Controller.extend("ui5.quickstart.App", {
onPress() {
MessageToast.show("Hello UI5!");
this.byId("app").to(this.byId("intro"));
},

onInit: function () {
onInit() {
this.getView().setModel(new JSONModel({
features: [
"Enterprise-Ready Web Toolkit",
Expand All @@ -163,8 +164,8 @@ sap.ui.define([
);
},

onChange: function (oEvent) {
var bState = oEvent.getParameter("state");
onChange(oEvent) {
const bState = oEvent.getParameter("state");
this.byId("ready").setVisible(bState);
}
});
Expand Down

0 comments on commit a4bcc2f

Please sign in to comment.