How to specify a button to open an URL?
问题 I want to write a web application that triggers the default email client of the user to send an email. Thus, I created a Link, that leads to an URL conforming to the mailto URI scheme (http://en.wikipedia.org/wiki/Mailto): Link emailLink = new Link("Send Email", new ExternalResource("mailto:someone@example.com")); However, instead of using a Link, I want to provide a Button that allows to trigger the respective functionality. But, for buttons I cannot set an ExternalResource to be opened.