Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for a Spring ViewScope as in V8 for MPR based projects #508

Open
StefanPenndorf opened this issue Nov 4, 2019 · 5 comments
Open
Assignees
Milestone

Comments

@StefanPenndorf
Copy link

Ticket #263 contains the discussion about a @RouteScope that originated from the request of a @ViewScope for Vaadin Flow Spring Add-on. The discussion - as far as I understood - focuses on implementing a comparable scope for Vaadin Flow based (parts of) a project.

We're planning to migrate Vaadin 7 projects to Vaadin 14 using MPR with the "old" Vaadin 7 components for the vast majority of the views and functionality. The current projects heavily rely on @ViewScope when navigating between views.

Thus using Vaadin 14 with MPR and Vaadin Spring Add-on will not work for us due to the missing Scope.

Are there any plans to restore the old functionality in order to support such scenarios? Maybe using a special legacy package and warnings in JavaDoc that this scope will work with Vaadin 7 / Vaadin 8 navigator based navigation, only?

@pleku
Copy link
Contributor

pleku commented Nov 11, 2019

The plan is to introduce the @RouteScope as described in #263. Since there are nested routes in V10+ and not really just something that always maps to @ViewScope, we don't have any plans for adding back the @ViewScope. But in some context, the semantics of both should be the same as.

I'm closing this issue, please follow and +1 #263 instead, thanks.

@pleku pleku closed this as completed Nov 11, 2019
@pleku pleku added this to the Abandoned milestone Nov 11, 2019
@StefanPenndorf
Copy link
Author

StefanPenndorf commented Dec 7, 2019

@pleku
I don't think this is a duplicate. Maybe it's the wrong repository to post this issue at. The @ViewScope I requested is something that should be working with Navigator and MPR only. Maybe it needs to be added to MPR instead?

The ultimate goal is: If there is a Vaadin 7 Application that should be migrated to Vaadin 14 using MPR I'd like to have a replacement for @ViewScope. As far as I have investigates I would end up with tons of compile errors after upgrading to Vaadin 14 + MPR because there is no @ViewScope anymore. If I could use @RouteScope and this Scope will change when navigating to another View using Navigator than @RouteScope would be sufficient and I would replace @ViewScope with @RouteScope for all my Vaadin 7 Views and corresponding beans.

BUT: As far as I read the discussion in #263 the @RouteScope will only apply to route changes using the new Router. But I might have misunderstood the discussion.

Without such a functionality step-by-step migration using MPR would be impossible.

@pleku pleku reopened this Dec 7, 2019
@pleku pleku removed the duplicate label Dec 7, 2019
@pleku
Copy link
Contributor

pleku commented Dec 7, 2019

@KyleRogers thanks for the feedback, I see now what you mean.

We have to discuss on the technical semantics of this issue first, and then try to figure out where this could fit in the backlog. I'm not sure if it would help if we have @RouteScope available first or not.

I want to be honest and say that unless this is fairly trivial, it might take a while since I don't recall any other requests for this issue. If this is trivial, then probably we could look at this as we go about @RouteScope.

@pleku
Copy link
Contributor

pleku commented May 19, 2021

Acceptance Criteria

@denis-anisimov
Copy link

The docs PR is not yet merged: accidentally closed , so reopened.

magi42 added a commit to vaadin/docs that referenced this issue Jun 22, 2021
* chore: explain how RouteScope can be used instead of ViewScope

part of vaadin/spring#508

* Update articles/tools/mpr/introduction/3-spring-boot.asciidoc

Co-authored-by: Marko Grönroos <[email protected]>

* Update articles/tools/mpr/introduction/3-spring-boot.asciidoc

Co-authored-by: Marko Grönroos <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants