You only need to inject the messageSource into the Spring managed View/UI/Component where you need it.
Maybe consider injecting it in the UI, so it’s accessible from the Views and components getting the current UI with UI.getCurrent(). Cast it to the specific UI that has the messageSource and use it:
public class MyUI.... {
@Autowired
private MessageSource messages;
getter/setter...
}
MyUI ui = (MyUI) UI.getCurrent();
ui.getMessages().getMessage(....
Hope it helps
Hello everyone. I agree with the easy ways that lets us work Alexander’s plugin about Spring, and mostly with system mesages.
Now I’ve got a problem about updating to 7.6.0. The plugin is not even compatible and I’m not able to migrate to the official Vaadin plugin.
May be any way to do this migration “easy” or adapt the plugin?
Thanks in advice, hope my question is not misplaced
Hi everybody.
I didn’t use Vaadin for several years. But I might try to adopt add-on to actual Vaadin’s version.
I tought my add-on was gone cause of the official add-on.
Thank you Alexander! It would be amazing
Here I explain where my webpage fails on 7.6:
There is a method, calling to your addon which implies a call to
com.vaadin.server.SystemMessages, specially to “outOfSyncCaption”, which is not even disposable since 7.5.6 ALPHA 3
Hope it helps you
Thanks in advice, and hope you update it as soon as possible (my coworkers will be really happy :D)
Hello everybody.
How can I enable SpringSecurity with both SpringVaadinServlet et DispatchServlet? I use code based configuration and WebApplicationInitializer.
Somebody can help me?