/** * @{inheritedDoc} */ @Override public void postProcess() { super.postProcess(); AbstractTableStructure table = (AbstractTableStructure) processedElement(); if (table.getTableStructure() instanceof TreeTableView) { treeTableView = (TreeTableView) table.getTableStructure(); treeTableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); treeTableView.getSelectionModel().selectedItemProperty().addListener((ChangeListener<Object>) (observable, oldValue, newValue) -> { LazyTreeItem item = (LazyTreeItem) newValue; selectedElementProperty().set(item.getValue()); }); } else if (table.getTableStructure() instanceof TreeView) { treeView = (TreeView) table.getTableStructure(); treeView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); treeView.getSelectionModel().selectedItemProperty().addListener((ChangeListener<Object>) (observable, oldValue, newValue) -> { lastSelectedTreeItem = (LazyTreeItem) newValue; selectedElementProperty().set(lastSelectedTreeItem.getValue()); }); } }
/** * @{inheritedDoc} */ @Override protected void process() { super.process(); final String leftSectionView = getRootComponent().getPropertyValue("leftSectionView"); if (StringUtils.isNotBlank(leftSectionView)) { leftSection = (FullTreeViewController) StandardViewUtils.forId(getRootStructure(), structureContentController, leftSectionView); final String location = leftSection.getRootComponent().getPropertyValue("location"); if (StringUtils.isNotBlank(location)) { } leftSection.selectedElementProperty().addListener((ChangeListener<OperationData>) (observable, oldValue, newValue) -> { final OperationData selectedModel = newValue; if (selectedModel != null) { getStructureContent().setFormModelData(selectedModel); getStructureContent().setForModelId((String) selectedModel.getAttributes().get("fullId")); final SingleResult result = new SingleResult(); result.setData(selectedModel); righSection.setModel(result); righSection.forceLoadFirstPage(); } }); leftPane.getChildren().add(leftSection.processedView()); } rightSectionView = getRootComponent().getPropertyValue("rightSectionView"); doBuildRightPane(); NodeHelper.styleClassSetAll(leftPane, getRootComponent(), "leftSectionAreaStyleClass", ""); NodeHelper.styleClassSetAll(rightPane, getRootComponent(), "rightSectionAreaStyleClass", ""); }