Hi guys,
I just started with Vaadin - i come from Wicket - and i really like how easy it was to set up my webapp.
Where should i put my string resources like captions, explanations and in general all text that goes with my components? I see a lot of people put it directly into the java code but that way it is all scattered over different classes. I like to have it all in one place, in previous projects we even sometimes provided the client with screenshots where texts were circled and numbered referencing the string in a resource textfile. That way whoever was maintaining the app could easily make user-requested changes.
A seperate resource file also makes internationalisation do-able.
[/list]The resources are used for example as follows:
Button register = new Button(app.getMessage(GasDiaryMessages.RegisterNewUser));
In this example application, the messages are written in a ListResourceBundle hard-coded in Java files. If you want to have them in non-Java files, you could use PropertyResourceBundles or implement some other bundle type.