Reputation: 193
I want to store URL of from browser in a Java String. Below is my code URL which opens up UI for creating password.
http://localhost:8080/createpassword?userId=1
I'm using Vaadin 23
Upvotes: 1
Views: 133
Reputation: 36143
UI.getCurrent().getPage().fetchCurrentURL(currentUrl -> {
// This is your own method that you may do something with the url.
// Please note that this method runs asynchronously
storeCurrentURL(currentUrl);
});
Read more: https://vaadin.com/docs/latest/advanced/browser-access
Upvotes: 5