Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion steps/05/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can download the solution for this step here: [📥 download step 5](https:/
***

### webapp/controller/App.controller.?s \(New\)
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.
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.

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".

Expand Down
6 changes: 2 additions & 4 deletions steps/23/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Finally we apply the filter to the items binding of the invoice list in our view
```ts
import Controller from "sap/ui/core/mvc/Controller";
import JSONModel from "sap/ui/model/json/JSONModel";
import formatter from "../model/formatter";
import { SearchField$SearchEvent } from "sap/m/SearchField";
import Filter from "sap/ui/model/Filter";
import FilterOperator from "sap/ui/model/FilterOperator";
Expand All @@ -54,13 +53,11 @@ import ListBinding from "sap/ui/model/ListBinding";
* @namespace ui5.walkthrough.controller
*/
export default class App extends Controller {
public formatter = formatter;

onInit(): void {
const viewModel = new JSONModel({
currency: "EUR"
});
this.getView()?.setModel(viewModel, "view");
this.getView()?.setModel(viewModel, "view");
}

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