public void doBuildCenterPane() { try { centerSectionView = getRootComponent().getPropertyValue("centerSectionView"); if (StringUtils.isNotBlank(centerSectionView)) { tableViewController = (FullTableViewController) StandardViewUtils.forId(getRootStructure(), structureContentController, centerSectionView); NodeHelper.styleClassSetAll(centerPane, getRootComponent(), "centerSectionAreaStyleClass", ""); tableViewController.getStructureContent().setCurrentEditingTableStructure(tableViewController); tableViewController.setParent(this); tableViewController.forceLoadFirstPage(); Platform.runLater(() -> { final Node centerSectionNode = tableViewController.processedView(); centerSectionNode.setCache(true); centerSectionNode.setCacheHint(CacheHint.SPEED); centerPane.getChildren().clear(); centerPane.getChildren().add(centerSectionNode); }); } } catch (final Exception ex) { ex.printStackTrace(); } }
/** * @{inheritedDoc} */ @Override public void postProcess() { super.postProcess(); AbstractTableStructure table = (AbstractTableStructure) processedElement(); if (table instanceof TableContent) { ((TableContent) table).setResponsiveColumnsMatrix(tableResponsiveMatrix); } if (table.getTableStructure() instanceof TableView) { tableView = (TableView) table.getTableStructure(); tableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); tableView.getSelectionModel().selectedItemProperty().addListener((ChangeListener<Object>) (observable, oldValue, newValue) -> selectedElementChangedTo((OperationData) newValue)); } model.addListener((ChangeListener<Object>) (observable, oldValue, newValue) -> { forceLoadFirstPage(); modelChanged(); }); }
/** * @{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", ""); }