Search in sources :

Example 1 with NullTreeTableContainer

use of com.haulmont.cuba.web.widgets.data.util.NullTreeTableContainer in project cuba by cuba-platform.

the class CubaTreeTable method setContainerDataSource.

@Override
public void setContainerDataSource(Container newDataSource) {
    disableContentRefreshing();
    if (newDataSource == null || newDataSource instanceof IndexedContainer) {
        // if it is just created
        newDataSource = new NullTreeTableContainer(new HierarchicalContainer());
    } else if (!(newDataSource instanceof Container.Hierarchical)) {
        throw new IllegalArgumentException("CubaTreeTable supports only Container.Hierarchical");
    }
    super.setContainerDataSource(newDataSource);
}
Also used : AggregationContainer(com.haulmont.cuba.web.widgets.data.AggregationContainer) TreeTableContainer(com.haulmont.cuba.web.widgets.data.TreeTableContainer) HierarchicalContainer(com.vaadin.v7.data.util.HierarchicalContainer) TableSortableContainer(com.haulmont.cuba.web.widgets.data.TableSortableContainer) Container(com.vaadin.v7.data.Container) NullTreeTableContainer(com.haulmont.cuba.web.widgets.data.util.NullTreeTableContainer) IndexedContainer(com.vaadin.v7.data.util.IndexedContainer) IndexedContainer(com.vaadin.v7.data.util.IndexedContainer) HierarchicalContainer(com.vaadin.v7.data.util.HierarchicalContainer) NullTreeTableContainer(com.haulmont.cuba.web.widgets.data.util.NullTreeTableContainer)

Aggregations

AggregationContainer (com.haulmont.cuba.web.widgets.data.AggregationContainer)1 TableSortableContainer (com.haulmont.cuba.web.widgets.data.TableSortableContainer)1 TreeTableContainer (com.haulmont.cuba.web.widgets.data.TreeTableContainer)1 NullTreeTableContainer (com.haulmont.cuba.web.widgets.data.util.NullTreeTableContainer)1 Container (com.vaadin.v7.data.Container)1 HierarchicalContainer (com.vaadin.v7.data.util.HierarchicalContainer)1 IndexedContainer (com.vaadin.v7.data.util.IndexedContainer)1