Skip to content

Commit

Permalink
OpenUI5 Documentation Update 03.05.2024
Browse files Browse the repository at this point in the history
  • Loading branch information
openui5bot committed May 3, 2024
1 parent b46f293 commit 128f9c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Step_5_Adding_Actions_to_the_Worklist_2da220f.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ Both actions are similar from an implementation perspective and the details are

- *Order*

For each of the selected items the binding path in the model is retrieved by calling the helper method `getBindingContextPath` on the selected item. Additionally, the data object from the model is fetched by calling `getBindingContext().getObject()` on the item. We update the data object and simply add `10` items to the stock to keep things simple in this example. Then we call the update function on the model with the product path and the new object. This will trigger an OData update request to the back end and a refresh of the model afterwards \(multiple requests are handled together in batch mode\). When the model refreshes, the table will be updated as well because of its binding.
For each of the selected items the binding path in the model is retrieved by calling `getBindingContext().getPath()` on the selected item. Additionally, the data object from the model is fetched by calling `getBindingContext().getObject()` on the item. We update the data object and simply add `10` items to the stock to keep things simple in this example. Then we call the update function on the model with the product path and the new object. This will trigger an OData update request to the back end and a refresh of the model afterwards \(multiple requests are handled together in batch mode\). When the model refreshes, the table will be updated as well because of its binding.

- *Remove*

For each of the selected items the binding path in the model is retrieved by calling the helper method `getBindingContextPath` on the selected item. Then, we call the `remove` function on the model with the product path. This triggers an OData `delete` request to the back end and a refresh of the OData model afterwards. Again, when the model is refreshed, the table will be updated as well because of its binding. The ODataModel v2 collects all these requests and only sends one batch request \(this default behavior can be changed\).
For each of the selected items the binding path in the model is retrieved by calling `getBindingContext().getPath()` on the selected item. Then, we call the `remove` function on the model with the product path. This triggers an OData `delete` request to the back end and a refresh of the OData model afterwards. Again, when the model is refreshed, the table will be updated as well because of its binding. The ODataModel v2 collects all these requests and only sends one batch request \(this default behavior can be changed\).


For each action we register both a `success` handler and an `error` handler. The `success` handler and `error` handler for each action is the same, but the function is called with different parameters. This allows us to use the same handler function for both the error and success case. Inside the corresponding handlers we simply display a success message once by comparing the current request number with the total number of requests. Furthermore, we assume that all of our requests always succeed.
Expand Down

0 comments on commit 128f9c6

Please sign in to comment.