Allow commit in new platform 7 not found

Hi, i am migrating from old version and i can’t find datasource property named “AllowCommit”, is there any way to reproduce same functionality on new platform 7 (setting allow commit disabled)?

image

Hello @marc.delphi

Could you clarify where you cannot find this property?

Regards,
Daniil

Hi Daniil, when using the new framework that property is missing on datasource component. I used “Allow Commit” unchecked on some dialogs for keep the entity data but without commiting to database until main entity screen is closed. Just i paste an image of datasource properties and “allow commit” no even more exists.

image

But using old api all looks fine as shown on the image at bottom:

image

The reason is that new Data Containers do not have this setting at all.

As an option you can subscribe for PreCommitEvent and invoke its preventCommit() method (see JavaDoc in DataContext).

Regards,
Danii.

Hi Daniil, when subscribing for PreCommitEvent i can’t obtain same results as “Allow commit” property does… bring a message dialog box waiting for confirmation of saving, and when I press “save” button the dialog box is displayed again entering a loop, here i paste the capture:

image

btw, my code seems to be correct as shown below:

image

I will continue debugging the code, but if you find a solution I would appreciate it if you let me know.

regards
marc

There is no full analog of allowCommit for containers. But you can use DataContext#evictAll to reset all information about modified / removed instances.

Regards,
Daniil