|
Re: Programmatically defined saved settings for table [message #1854264 is a reply to message #1854255] |
Tue, 09 August 2022 15:46 |
|
Miloslav Frajdl wrote on Tue, 09 August 2022 10:04Is there a possibility to programmatically define "saved" settings for the table in Scout Classics? So that users can choose from the author's presets?
And is it possible to programmatically switch between these settings (e.g. after pressing a button)?
The table view settings are stored in the ClientUIPreferences. Have a look at the code in OrganizeColumnsForm.java, especially storeCurrentStateAsConfig() and ApplyMenu. The preference key is derived from the class name of the table and the name of the setting.
Technically, you should be able to initialize these settings programmatically, but the API is not very convenient. Also, you would have to prepare the settings for each user, and they would be able to manipulate your presets.
It might be easier to simply add some custom "Change view" menus to the table that programmatically sets the desired properties to the columns. Alternatively you could replace the entire OrganizeColumnForm by replacing the OrganizeColumnsFormProvider bean.
Regards,
Beat
|
|
|
Powered by
FUDForum. Page generated in 0.01916 seconds