Search in sources :

Example 1 with TreeDataGrid

use of com.haulmont.cuba.gui.components.TreeDataGrid in project jmix by jmix-framework.

the class CubaTreeDataGridLoader method setupDataContainer.

@Override
protected void setupDataContainer(DataGridDataHolder holder) {
    if (holder instanceof CubaTreeDataGridDataHolder) {
        CollectionDatasource datasource = ((CubaTreeDataGridDataHolder) holder).getDatasource();
        if (datasource == null) {
            return;
        }
        ((TreeDataGrid) resultComponent).setDatasource(datasource);
        DynAttrEmbeddingStrategies embeddingStrategies = applicationContext.getBean(DynAttrEmbeddingStrategies.class);
        embeddingStrategies.embedAttributes(resultComponent, getComponentContext().getFrame());
    } else {
        super.setupDataContainer(holder);
    }
}
Also used : DynAttrEmbeddingStrategies(io.jmix.dynattrui.DynAttrEmbeddingStrategies) CollectionDatasource(com.haulmont.cuba.gui.data.CollectionDatasource) TreeDataGrid(com.haulmont.cuba.gui.components.TreeDataGrid)

Aggregations

TreeDataGrid (com.haulmont.cuba.gui.components.TreeDataGrid)1 CollectionDatasource (com.haulmont.cuba.gui.data.CollectionDatasource)1 DynAttrEmbeddingStrategies (io.jmix.dynattrui.DynAttrEmbeddingStrategies)1