Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vaadin redirecting to a URL from button click

Tags:

java

vaadin

I have searched for a long time, but I really cannot figure this out.

How do I redirect the user to a new external link (e.g. www.google.com) when they click a button in Vaadin?

The only thing I have managed to do so far is to put the link into a link

Link link = new Link("link", new ExternalResource("http://www.google.com"));

Can anyone help me out with this please?

like image 588
user3702643 Avatar asked Jun 03 '14 10:06

user3702643


1 Answers

getUI().getPage().setLocation("http://www.google.com");

References: Page (Vaadin 7.2.1 API) and Vaadin application lifecycle (Book of Vaadin).

like image 88
VH-NZZ Avatar answered Oct 16 '22 03:10

VH-NZZ