Skip to content

Commit bfed7c8

Browse files
authored
Update README step 5 and step 23 (#178)
* Update README due to typo the word "controller" was mistyped * Remove unused formatter from App controller and cleaned up InvoiceList.view.xml README.md code is different from the actual code and did not compile. Removed unused formatter import and related code.
1 parent c51c034 commit bfed7c8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

steps/05/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can download the solution for this step here: [📥 download step 5](https:/
3333
***
3434

3535
### webapp/controller/App.controller.?s \(New\)
36-
First of all, we need a conroller for our app view that defines how the view should react to user inputs, such as a button press event.
36+
First of all, we need a controller for our app view that defines how the view should react to user inputs, such as a button press event.
3737

3838
We create a new folder called `controller` inside the `webapp` folder. This folder will hold all our controller files. Inside the `controller` folder, we create a new file called `App.controller.?s`. We define the app controller in its own file by extending the OpenUI5-provided `sap/ui/core/mvc/Controller`. In the beginning, it holds only a single function called `onShowHello` that shows an alert with the static text "Hello World".
3939

steps/23/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Finally we apply the filter to the items binding of the invoice list in our view
4444
```ts
4545
import Controller from "sap/ui/core/mvc/Controller";
4646
import JSONModel from "sap/ui/model/json/JSONModel";
47-
import formatter from "../model/formatter";
4847
import { SearchField$SearchEvent } from "sap/m/SearchField";
4948
import Filter from "sap/ui/model/Filter";
5049
import FilterOperator from "sap/ui/model/FilterOperator";
@@ -54,13 +53,11 @@ import ListBinding from "sap/ui/model/ListBinding";
5453
* @namespace ui5.walkthrough.controller
5554
*/
5655
export default class App extends Controller {
57-
public formatter = formatter;
58-
5956
onInit(): void {
6057
const viewModel = new JSONModel({
6158
currency: "EUR"
6259
});
63-
this.getView()?.setModel(viewModel, "view");
60+
this.getView()?.setModel(viewModel, "view");
6461
}
6562

6663
onFilterInvoices(event: SearchField$SearchEvent): void {
@@ -136,6 +133,7 @@ In addition, we remove the `headerText` property in the list control and use `he
136133
<mvc:View
137134
controllerName="ui5.walkthrough.controller.InvoiceList"
138135
xmlns="sap.m"
136+
xmlns:core="sap.ui.core"
139137
xmlns:mvc="sap.ui.core.mvc">
140138
<List
141139
id="invoiceList"

0 commit comments

Comments
 (0)