Getting the same view after refresh (but view has @ViewScope)

Hi,

I’m new, so please let me know when I forgot some information that you need.

I’m using Vaadin 7.7.5
and Spring Framework 4.2.5.RELEASE

With Vaadin 7.7 it is not possible navigate to the current view to refresh the view.
So I have implemented a “RefreshView” which navigates to an other view (with parameters).
This solution is fine to me, but …

If I “refresh” the view, lets call the view “SampleView” (with my RefreshView), I will get extactly the same instance of the SampleView.
When I “refresh” the SampleView again (same procedure), I will get a new instance of the view.

Does someone know why?
I want always a new instance of the view.

The SampleView has the spring annotation

@SpringView(name = SampleView.NAME)

The RefreshView Snippet

...
public void enter(ViewChangeEvent event)
    {
        String view = event.getParameters();
        UI.getCurrent().getNavigator().navigateTo(view);
    }
...

Thanks in advance,
Florian

Can you double check if your case is this one? https://github.com/vaadin/spring/issues/165

Hi,
thanks for your answer.

I don’t define any scope, because vaadin should do this be default with ViewScope.
And my SampleView should be ViewScope to get a new instance on a reload/refresh.

It also doesn’t work when I define the ViewScope.