flow
flow copied to clipboard
UIInitEvent should have the current path
Describe your motivation
There is no way to get the current path in the UIInitEvent
. Since VaadinRequest.getPath()
returns "/". But i don't see why this should be a problem since the BootstrapHandler
has the current Route in the BootstrapContext.getRoute()
.
Describe the solution you'd like
I would like to access the current path in the UIInitEvent
or access it threw the VaadinRequest
Describe alternatives you've considered
My current alternative is to implement my own BootstrapHandler
and firing an own "UiInitEvent" after the createAndInitUI
Method is called.
@ImOlli maybe not be exactly what you want, but you can use the following to get the current URL basically anywhere in the code:
UI.getCurrent().getPage().fetchCurrentURL(url -> System.out.println(url));