John67
(John Melody)
1
Hi
I want to navigate to a static html page from within a Vaadin application that contains the following html.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Refresh" content="0;url=https://aru.sybernet.com/hpp/gp-response">
</head>
<body>
</body>
</html>
How would I do that ?
thanks, John.
Tatu2
(Tatu Lund)
2
With ui.navigate(..)
you can navigate only to registered routes, if you have external URL, then one alternative is to use ui.getPage().setLocation(..)
John67
(John Melody)
3
Tatu
Do you mean UI.getCurrent().getPage().setLocation(…) ? This is not available in Vaadin 10 I don’t think.
Is there any other way?
Thanks,John.
Tatu2
(Tatu Lund)
4
Yes, it is a new method added in V14.
You can also do for example
ui.getPage().executeJavaScript("window.open($0, $1)", url, "_self");