Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin spring integration

GodOfBinary Okty
6 years ago Dec 19, 2015 1:05pm
Ilia Motornyi
6 years ago Dec 21, 2015 3:56pm
Francisco Serrano
6 years ago Dec 21, 2015 8:09pm

You usually need to "auto discover" the views with the SpringViewProvider.
@Inject private SpringViewProvider viewProvider;
You inject this provider into your UI and then setup a layout/panel to use it as the view container ("viewDisplay").
VerticalLayout viewDisplay = new VerticalLayout();

Have a look at this:
https://vaadin.com/wiki?p_p_id=36&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&_36_struts_action=%2Fwiki%2Fview&_36_pageResourcePrimKey=9265063&p_r_p_185834411_nodeName=vaadin.com+wiki&p_r_p_185834411_title=I+b+-+Getting+started+with+Vaadin+Spring+without+Spring+Boot
Create a view, annotating the class with @SpringView(name = "theNameOfYourView")
Instanciate a Navigator using the UI and the view container (the layout you just created)

this.navigator = new Navigator(this, viewDisplay);
this.navigator.addProvider(viewProvider);

and then just:

navigator.navigateTo("theNameOfYourView");

This will basically make your view appear as the content for the "viewDisplay" layout.
As Ilia already stated, some code or repository URL would be of help to assist you
Cheers
Fran
 

GodOfBinary Okty
6 years ago Dec 22, 2015 10:47am

ok thank you verry much. Every thing is work so good now.

Francisco Serrano
6 years ago Dec 22, 2015 11:00am
GodOfBinary Okty
6 years ago Dec 22, 2015 11:05am
Francisco Serrano
6 years ago Dec 22, 2015 11:14am