Hello !
I’m back with a few naive questions :
- Can you not use the router and the @Route annotation ?
- How can I add CAS to my app ?
For context, I’m currently migrating an app from Vaadin 7 to Flow.
First time using Vaadin, so understanding two version of the technology at once is not easy.
After creating a few views, I need to add the link between CAS and my app.
In the old app, I got a “MainApplication” which override the “protected void init(VaadinRequest request)” from UI to get the VaadinRequest.
From what I understood, this is used to get the request from which I get the login from the CAS with “VaadinService.getCurrentRequest()”, and to create the first view.
For now, in my actual app, I use the @Route(“”) on a view, which is calling the “MainApplication” and creating it.
Since I’m not overriding the init method, I don’t have the request and when I try to do the “getCurrentRequest”, the method return null and the application doesn’t like it, which is normal.
But when I try to override the method, my override is not used, so I still don’t have the request.
So I tried to get rid of the @Route annotation, to let the override take over the creating of the first view (since it’s what I understood), but it doesn’t seem to work.
I suppose that I’m doing something (maybe all of it) not correctly and I’m here to ask the questions at the top of my post.
In the documentation, I read in the routing part that :
“In fact, if deep linking isn’t needed, even a large Vaadin application can ignore routing and navigation APIs for simplicity and only route the entry view to the root URL of the application.” https://vaadin.com/docs/latest/routing
So I suppose that I’m obligated to use the @Route in Vaadin Flow at least for the first view ?
I didn’t find any information about CAS and Vaadin Flow, so I’m totally lost.
Thank you for your help, and sorry for the big context.