You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -10,7 +10,7 @@ Along with additional SAP-specific pages the content is published to https://cap
10
10
11
11
## Support, Feedback, Contributing
12
12
13
-
This project is open to feature requests/suggestions, bug reports, etc. via [GitHub issues](https://github.com/cap-js/docs/issues) and [pull requests](https://github.com/cap-js/docs/pulls). Contribution and feedback are encouraged and always welcome.
13
+
This project is open to feature requests/suggestions, bug reports, etc. via [GitHub issues](https://github.com/capire/docs/issues) and [pull requests](https://github.com/capire/docs/pulls). Contribution and feedback are encouraged and always welcome.
14
14
15
15
See our [contribution guidelines](CONTRIBUTING.md) for information about how to contribute, the project structure, as well as additional contribution information.
16
16
@@ -19,7 +19,7 @@ See our [contribution guidelines](CONTRIBUTING.md) for information about how to
19
19
If you contribute often to the documentation it's best to create your own fork, clone it to your local machine.
20
20
21
21
```sh
22
-
git clone https://github.com/cap-js/docs # or whatever your fork's URL is
22
+
git clone https://github.com/capire/docs # or whatever your fork's URL is
23
23
```
24
24
25
25
Install the dependencies:
@@ -53,4 +53,4 @@ We as members, contributors, and leaders pledge to make participation in our com
53
53
54
54
## Licensing
55
55
56
-
Copyright 2023-2025 SAP SE or an SAP affiliate company and CAP contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/cap-js/docs).
56
+
Copyright 2023-2025 SAP SE or an SAP affiliate company and CAP contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/capire/docs).
Copy file name to clipboardExpand all lines: advanced/fiori.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -466,12 +466,38 @@ POST /odata/v4/AdminService/Books(ID=a11fb6f1-36ab-46ec-b00c-d379031e817a,IsActi
466
466
Content-Type: application/json
467
467
468
468
{}
469
-
469
+
```
470
470
471
471
For more details, see the [official UI5 documentation](https://ui5.sap.com/#/topic/ed9aa41c563a44b18701529c8327db4d).
472
472
473
473
### Validating Drafts
474
474
475
+
With Fiori draft state messages, you benefit from the following improvements without any change in your application code:
476
+
- The UI displays error messages for annotation-based validations (such as `@mandatory` or `@assert...`) while editing drafts.
477
+
- You can register [custom validations](#custom-validations) to the `PATCH` event and write (error) messages. The draft choreography ensures the invalid value still persists.
478
+
- Messages remain visible in the UI, even after editing other fields.
479
+
- The UI automatically loads messages when reopening a previously edited draft.
480
+
CAP generates side-effect annotations in the EDMX to instruct UI5 to fetch state messages after every `PATCH` request. To control side-effect annotations more precisely, override or disable them per entity:
481
+
482
+
```cds
483
+
// Setting `null` disables the side-effect annotation for always fetching messages.
484
+
annotate MyService.MyEntity with @Common.SideEffects #alwaysFetchMessages: null;
485
+
```
486
+
487
+
For this feature to work correctly, CAP adds additional elements to your draft-enabled entities and [`DraftAdministrativeData`](/guides/security/data-protection-privacy#dpp-cap) to store and serve the state messages. CAP runtimes persist (error) messages for draft-enabled entities.
488
+
489
+
::: warning Requires Schema Update
490
+
This feature initiates a database schema update, as it adds an additional element to `DraftAdministrativeData`.
491
+
:::
492
+
493
+
::: warning Requires OData V4 and UI5 version >=1.135.0
494
+
State messages require UI5 to use _document URLs_. CAP sets the `@Common.AddressViaNavigationPath` annotation to enable this. You need OData V4 and UI5 version >= 1.135.0. OData V2 does not support this annotation.
495
+
:::
496
+
To disable this feature, set <Config>cds.fiori.draft_messages:false</Config>.
497
+
498
+
499
+
#### Custom Validations
500
+
475
501
You can add [custom handlers](../guides/providing-services#custom-logic) to add specific validations, as usual. In addition, for a draft, you can register handlers to the respective `UPDATE` events to validate input per field, during the edit session, as follows.
0 commit comments