Dear Jmix Team
In the documentation on Application Settings :: Jmix Documentation is the dataManager.save(appSettings); missing in the sample at the bottom.
Regards
Felix
Dear Jmix Team
In the documentation on Application Settings :: Jmix Documentation is the dataManager.save(appSettings); missing in the sample at the bottom.
Regards
Felix
Hi,
AppSettings is a bean for getting settings in the application code. It cannot be saved. The code in the example is correct. It shows how to initialize an entity with default values obtained using the application settings add-on feature. Pay attention that the entity is initialized in the InitEntityEvent handler, i.e., before the entity is added to the InstanceContainer and should not be saved manually.
Regards,
Gleb
Hi @gorelov
In my finance application, there is a daterange initialised with the dates from AppSettings. If the user changes this daterange, this is saved as a new default value for the next reports. To save the entered values makes fully sense in this application.
What problems do I face, if I save these values from the application ? If I should not save these values, what for are the setters ?
Regards
Felix
You’ve suggested changes to the documentation sample code, which is correct, so no changes are needed.
For your particular case, you can implement any logic you need. Pay attention that AppSettings is a bean that is used to load application settings entities. If you need to update an application setting entity outside of the dedicated view, you are free to do so.
Regards,
Gleb