Spring integration

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

Fran

Hi Fran:

Thanks for your reply.

But what I am talking about, is not how to use MessageSource to get message text for my app,
What I want, is to localize Vaadin system message.
#See:
https://vaadin.com/book/-/page/application.errors.html#application.errors.systemmessages

Alexander Fedorov’s add-on “SpringVaadinIntegration” can do it for us, very easy to use:
#see:
http://vaadin.xpoft.ru/#system_messages

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. :slight_smile:

Thank you Alexander! It would be amazing :slight_smile:
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)

I’ve published the add-on. Please, try it.

Hello. I’ve tried it and it worked flawless, at least in my project.
Thank you so much!

Wonderful news!

Hello everybody.
How can I enable SpringSecurity with both SpringVaadinServlet et DispatchServlet? I use code based configuration and WebApplicationInitializer.
Somebody can help me?

Hi all,

Wondering, how to use this add-on if project does not have web.xml at all?