/** * @{inheritedDoc} */ @Override protected void process() { super.process(); if (getRootStructure().relativeToProperty().get() != null) { if (getStructureContentController().getFormModelData() == null) { getStructureContentController().setFormModelData(getRootStructure().relativeToProperty().get()); } } doBuildLeftPane(); doBuildCenterPane(); doBuildRightPane(); // TO UPDATE RIGHT PANE, LEFT MUST SET THE NEW MODEL TO // STRUCTURE CONTENT FORM MODEL DATA, // THE RIGHT PANE WILL LISTEN TO CHANGE ON THIS OBJECT TO UPDATE ITSELF }
/** * @{inheritedDoc} */ @Override public VLViewComponentXML getConfiguration() { return getRootComponent(); } }
/** * Default Constructor */ public LeftRightNodeWithTableContentViewController() { super(); registerListener(new ElementRemovedFromTableEvent()); }
public void doBuildLeftPane() { final String leftSectionView = getRootComponent().getPropertyValue("leftSectionView"); if (StringUtils.isNotBlank(leftSectionView)) { leftPaneController = StandardViewUtils.forId(getRootStructure(), structureContentController, leftSectionView); leftPaneController.setParent(this); NodeHelper.styleClassSetAll(leftPane, getRootComponent(), "leftSectionAreaStyleClass", ""); final String location = leftPaneController.getRootComponent().getPropertyValue("location"); if (StringUtils.isNotBlank(location)) { } final ChangeListener<OperationData> cl = (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); tableViewController.setModel(result); } }; leftPaneController.selectedElementProperty().addListener(cl); Platform.runLater(() -> { leftPane.getChildren().add(leftPaneController.processedView()); }); } }
public void doBuildRightPane() { final String rightSectionView = getRootComponent().getPropertyValue("rightSectionView"); if (StringUtils.isNotBlank(rightSectionView)) { rightPaneController = StandardViewUtils.forId(getRootStructure(), structureContentController, rightSectionView); rightPaneController.setParent(this); NodeHelper.styleClassSetAll(rightPane, getRootComponent(), "rightSectionAreaStyleClass", ""); final String location = rightPaneController.getRootComponent().getPropertyValue("location"); if (StringUtils.isNotBlank(location)) { } Platform.runLater(() -> { rightPane.getChildren().add(rightPaneController.processedView()); }); } }
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(); } }