To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
Link link = new Link("Click Me!", new ExternalResource("http://vaadin.com/"));
How can I create a link to my homepage? There is no InternalResource("/").I looked at all the other XXXResource but found nothing. Do I have to get the web context and use ExternalResource with it?
Is this really the best way?
ServletContext servletContext = VaadinServlet.getCurrent().getServletContext(); ExternalResource er = new ExternalResource(servletContext.getContextPath()+"/"); Link label = new Link("XXXXX", er);