Example usage for com.vaadin.ui Link Link

List of usage examples for com.vaadin.ui Link Link

Introduction

In this page you can find the example usage for com.vaadin.ui Link Link.

Prototype

public Link(String caption, Resource resource) 

Source Link

Document

Creates a new instance of Link.

Usage

From source file:v7cr.V7CR.java

License:Open Source License

Link getFile(BSONBackedObject file) {
    String fn = file.getStringField("filename");
    String sha = file.getStringField("sha");
    if (fn == null || sha == null)
        return null;

    URL url = getURL();/*from   w w  w. ja v a2s  . co  m*/
    return new Link(fn, new ExternalResource(
            url.getProtocol() + "://" + url.getHost() + ":8088/upload/v7cr?filename=" + fn + "&sha=" + sha));
}