I'm trying to inject a couple of spring services into a NavigationView (Vaadin Touchkit) and the view is not being managed by Spring at all, so no @PostConstruct method is called and therefore services are not being called.
Is it possible to manage this type of views as spring beans the same way normal Vaadin Views can be managed?
Otherwise, how can I use a injected service in a Vaadin Touchkit NavigationView?
Declaration of the class:
@VaadinView(name = Views.HOME)
@UIScope
public class HomeView extends NavigationView {
@Autowired
private WindDataClientService windDataClientService;
@Autowired
private ForecastDataService forecastDataService;
...
...
...
@PostConstruct
public void init() {
grpConditions.addComponent(lnkConditionsTitle);
grpConditions.addComponent(buildConditionRows());
lblAlertsTitle.setCaption(lblAlertsTitle.getCaption() + forecastDataService.findClosestForecast());
}
}
Thanks a lot in advance