Shared Preferences Provider

Hi,

is there something like Androids Shared Preferences in Vaadin ?
I used the wizard and have no idea to get the settings from the wizard class
to my main class without to write it in static fields from the main class.
I there a shared preferences provider i missed ? Something thread safe ?

Thanks for help

Greetings

Björn

Hi,

Sounds like
java.util.Properties
might be what you are looking for? For a thing like SharedPreferences.Editor, I once created special
“PropertiesItem”
that can be used to bind java.util.Properties directly to a Vaadin Form or FieldGroup.

For “thread safety” it usually enough that you keep a copy of them stored in field variable in your UI class (one instance per user then) and shared between the users by saving/loading them from a file.

Thanks for your quick reply. I try it today.
java.util.Properties i fully forgot, but don’t know why. :wink: