/** * Getter of buildedTabsController * * @return the buildedTabsController */ public void addBuildedTabsController(AbstractViewController tabController) { buildedTabsController.add(tabController); if (tabController instanceof StandardViewController) { ((StandardViewController) tabController).selectedElementProperty().addListener((ChangeListener<OperationData>) (observable, oldValue, newValue) -> { this.selectedElementProperty().set(newValue); }); } }
@Override public void execute(IActionRequest actionRequest, Optional<IActionResult> previousActionResult) { StandardViewController controller = (StandardViewController) actionRequest.getController(); OperationData data = (OperationData) actionRequest.getProperty("sourceData"); controller.selectedElementProperty().set(data); IFormRowEditor editor = controller.getParent().currentForwarEditor(); if(editor != null) { Platform.runLater(()->{ editor.getInlineEditionHandler().onDone(editor); }); } } }
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); String view = "FolderPickerFlowView"; StandardViewController c = StandardViewUtils.forId((RootStructureController) controller.getRootStructure(), view); display = c.processedView(); c.setParent((AbstractViewController) controller); c.selectedElementProperty().addListener(new ChangeListener<OperationData>() { @Override public void changed(ObservableValue<? extends OperationData> observable, OperationData oldValue, OperationData newValue) { if(newValue == null) { } else { String folderOid = (String) newValue.getAttributes().get("fullId"); String folderPath = (String) newValue.getAttributes().get("path"); owner.initialInternalValueProperty().set(folderPath); owner.currentInternalValueProperty().set(folderPath); } } }); }
/** * {@inheritDoc} */ @Override public void doBuildCenterPane() { super.doBuildCenterPane(); AbstractTableStructure ts = (AbstractTableStructure) leftPaneController.processedElement(); AbstractTableStructure ts2 = (AbstractTableStructure) getTableController().processedElement(); leftPaneController.selectedElementProperty().addListener(new ChangeListener<OperationData>() { @Override public void changed(ObservableValue<? extends OperationData> observable, OperationData oldValue, OperationData newValue) { if(newValue != null) { ts2.childTree().setAll(ts.childTree()); SingleResult sr = new SingleResult(); sr.setData(newValue); getTableController().setModel(sr); getTableController().refreshDatas(); } else { getTableController().getTableStructure().setNoContent(); } }}); getStructureContent().setCurrentEditingTableStructure(getTableController()); }
public void doBuildLeftPane() { final String leftSectionView = getRootComponent().getPropertyValue("leftSectionView"); if (StringUtils.isNotBlank(leftSectionView)) { try { 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)) { } if(leftPaneController instanceof FullTableStructureController) { leftPaneController.getStructureContent().setCurrentEditingTableStructure(leftPaneController); } final ChangeListener<OperationData> cl = (ChangeListener<OperationData>) (observable, oldValue, newValue) -> { final OperationData selectedModel = newValue; leftPaneSelectedElementChange(selectedModel); }; // update model of right pane when left pane // selection is modified. // do not change the structure content model reference!! leftPaneController.selectedElementProperty().addListener(cl); Platform.runLater(() -> { leftPane.getChildren().add(leftPaneController.processedView()); }); } catch (Exception e) { e.printStackTrace(); } } }
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()); }); } }
leftSection.selectedElementProperty().addListener((ChangeListener<OperationData>) (observable, oldValue, newValue) -> { selectedModel = newValue; if (selectedModel != null) {