Example usage for com.vaadin.v7.ui Table setContainerDataSource

List of usage examples for com.vaadin.v7.ui Table setContainerDataSource

Introduction

In this page you can find the example usage for com.vaadin.v7.ui Table setContainerDataSource.

Prototype

@Override
public void setContainerDataSource(Container newDataSource) 

Source Link

Document

Sets the Container that serves as the data source of the viewer.

Usage

From source file:com.adonis.ui.print.PrintVehiclesUI.java

@Override
protected void init(VaadinRequest request) {
    Table table = new Table();
    table.setContainerDataSource(MainUI.getVehiclesCrudView().container);
    table.setVisibleColumns("vehicleNmbr", "licenseNmbr", "make", "vehicleType", "model", "year", "active",
            "location", "price", "priceDay", "priceWeek", "priceMonth", "status");
    // Have some content to print
    setContent(table);//from  ww w.  ja v a 2  s. co m
    // Print automatically when the window opens
    JavaScript.getCurrent().execute("setTimeout(function() {" + "  print(); self.close();}, 0);");
}