use of com.vaadin.flow.data.bean.HierarchicalTestBean in project flow-components by vaadin.
the class TreeGridOrderColumnsPage method initializeDataProviders.
private void initializeDataProviders() {
TreeData<HierarchicalTestBean> data = new TreeData<>();
List<Integer> ints = Arrays.asList(0, 1, 2);
ints.stream().forEach(index -> {
HierarchicalTestBean bean = new HierarchicalTestBean(null, 0, index);
data.addItem(null, bean);
ints.stream().forEach(childIndex -> {
HierarchicalTestBean childBean = new HierarchicalTestBean(bean.getId(), 1, childIndex);
data.addItem(bean, childBean);
ints.stream().forEach(grandChildIndex -> data.addItem(childBean, new HierarchicalTestBean(childBean.getId(), 2, grandChildIndex)));
});
});
}
Aggregations