cancel
Showing results for 
Search instead for 
Did you mean: 

Side effects on bound action with @assert.range creates empty error dialog

htammen
Active Contributor
0 Kudos
439

In my Fiori Elements app I created an action with a side effect and an @assert.range.
When I enter a value that's out of the defined range I first get an empty dialog that I have to close. After that the value state message is shown at the input field.

Detailed steps to reproduce

My code from changed CAP SFlight example (srv/travel-service.cds)

entity Travel as projection on my.Travel actions {
action createTravelByTemplate() returns Travel;
@(Common.SideEffects.TargetEntities: ['/TravelService.EntityContainer/Travel'])
action rejectTravel(times: Integer @UI.ParameterDefaultValue: 1 @assert.range: [
1,
10
] );
//action rejectTravel();
action acceptTravel();
action deductDiscount( percent: Percentage not null ) returns Travel;
};

As you can see I slightly changed the rejectTravel action by adding an @assert.range annotation that allows numbers from 1 to 10. Additionally I added a SideEffects annotation that should update the Travel EntitySet.

If I now press the Reject Travel button a dialog appears that asks me for the number.
After entering a value >10 in this dialog, I first get this empty dialog

When I close this the expected dialog with value state message is shown.

Technical details about my project

https://github.com/SAP-samples/cap-sflight
OData version: v4
Node.js version: v18.16.0
@sap/cds: 6.8.1
sap.ui.version: 1.108.2

Accepted Solutions (0)

Answers (0)