/** * @{inheritedDoc} */ @Override protected void process() { super.process(); }
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(); } } }
/** * {@inheritDoc} */ @Override public void beforePop() { super.beforePop(); if (needRefreshBeforePop) { needRefreshBeforePop = false; getTableStructure().refreshDatas(); } }
controller.setId(identifier); controller.setStructureContentController(structureContentController); if (controller.isInitialized()) { controller.setRootStructure(parent.getRootStructure()); controller.setParent(parent); loadModel(controller); controller.initViewContext(configXML, parent.getRootStructure().getRootContext()); controller.build(); controller.setInitialized(true); return controller; } catch (final Exception e) {
if (controller.isInitialized()) { return controller; controller.setRootStructure(root); controller.setStructureContentController(null); controller.setId(identifier); final SingleResult singleResult = new SingleResult(); singleResult.setData(model); controller.setModel(singleResult); controller.initViewContext(configXML, root.getRootContext()); controller.build(); controller.setInitialized(true); return controller; } catch (final Exception e) {
@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); } } }); }
super.process(); leftSection = StandardViewUtils.forId(getRootStructure(), structureContentController, leftSectionView); final String location = leftSection.getRootComponent().getPropertyValue("location"); if (StringUtils.isNotBlank(location)) { final String loc = leftSection.getLocalised(location); leftSection.selectedElementProperty().addListener((ChangeListener<OperationData>) (observable, oldValue, newValue) -> { selectedModel = newValue; if (selectedModel != null) { leftPane.getChildren().add(leftSection.processedView());
public void doBuildLeftPane() { final String leftSectionView = getRootComponent().getPropertyValue("leftSectionView"); if (StringUtils.isNotBlank(leftSectionView)) { leftController = StandardViewUtils.forId(getRootStructure(), structureContentController, leftSectionView); leftController.setParent(this); NodeHelper.styleClassSetAll(leftPane, getRootComponent(), "leftSectionAreaStyleClass", "ep-two-hpanes-with-left-menu-wrapper"); leftPane.getChildren().add(leftController.processedView()); } }
super.process(); if (StringUtils.isNotBlank(headerTopSection)) { StandardViewController top = StandardViewUtils.forId(getRootStructure(), null, headerTopSection); headerTopSectionHbox.getChildren().add(top.processedView()); if (StringUtils.isNotBlank(headerTopSection)) { StandardViewController bottom = StandardViewUtils.forId(getRootStructure(), null, headerBottomSection); headerBottomSectionHbox.getChildren().add(bottom.processedView());
public void doBuildRightPane() { try { rightSectionView = getRootComponent().getPropertyValue("rightSectionView"); if (StringUtils.isNotBlank(rightSectionView)) { tableViewController = StandardViewUtils.forId(getRootStructure(), structureContentController, rightSectionView); NodeHelper.styleClassSetAll(rightPane, getRootComponent(), "rightSectionAreaStyleClass", ""); if(tableViewController instanceof FullTableStructureController) { tableViewController.getStructureContent().setCurrentEditingTableStructure(tableViewController); } tableViewController.setParent(this); // tableViewController.forceLoadFirstPage(); Platform.runLater(() -> { final Node rightSectionNode = tableViewController.processedView(); rightSectionNode.setCache(true); rightSectionNode.setCacheHint(CacheHint.SPEED); rightPane.getChildren().clear(); rightPane.getChildren().add(rightSectionNode); }); } } catch (final Exception ex) { ex.printStackTrace(); } }
/** * Get last item in the child tree. Return null is child tree is empty, else return the last item. * Last item is the parent of current displayed datas. * * @return */ public OperationData getLastChildTree() { AbstractTableStructure ts2 = (AbstractTableStructure) leftPaneController.processedElement(); if( ts2.childTree().size() > 0) return ts2.childTree().get( ts2.childTree().size() -1); return null; }
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()); }); } }
/** * {@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 loadDetailsView() { try { final StandardViewController righSection = StandardViewUtils.forId(getRootStructure(), structureContentController, detailsView); final String location = righSection.getRootComponent().getPropertyValue("location"); if (StringUtils.isNotBlank(location)) { final String loc = righSection.getLocalised(location); // contentLocation.set(loc); } Platform.runLater(() -> { rightPane.setCache(true); rightPane.setCacheHint(CacheHint.SPEED); rightPane.getChildren().clear(); rightPane.getChildren().add(righSection.processedView()); }); } catch (final Exception ex) { // TODO: handle exception ex.printStackTrace(); } }
/** * {@inheritDoc} */ @Override protected void process() { super.process(); if (processedView() == null) { processedView(new StackPane()); } }
protected String getRoleA(IActionRequest actionRequest, Optional<IActionResult> previousActionResult) { final StandardViewController scc = (StandardViewController) actionRequest.getController(); AbstractViewController c = scc.getParent(); roleA = scc.getStructureContent().getCurrentEditingTableStructure().getOpData();
@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 synchronized <T extends GenericEvent> void handle(T e) { super.handle(e); VLTabpane tabpane = (VLTabpane) buildable; if (e.isA(CoreEvent.PopTabContentEvent)) { tabpane.popCurrentContent(false); } else if (e.isA(CoreEvent.PushTabContentEvent)) { PushTabContentEvent ev = (PushTabContentEvent) e; if (ev.getParentController() == this) { String viewId = ev.getProperty("viewId"); if (StringUtils.isNotBlank(viewId)) { final StandardViewController view = StandardViewUtils.forId(rootStructure, viewId, (OperationData) ev.getModel()); view.setParent(this); tabpane.pushCurrentContent(view); UpdateCurrentLocationEvent ucl = new UpdateCurrentLocationEvent(); ucl.setHasPrevious(true); ucl.setSourceController(view); ucl.setTabContentNavigation(true); ((AbstractViewController) getController()).dispatchEvent(ucl); } } } }
structureContent.processedView(view.processedView()); event.setProcessedContent(structureContent); if (view.getRootComponent() != null) { final String rootStructureContentStyleClass = view.getRootComponent().getPropertyValue("rootStructureContentStyleClass"); if (StringUtils.isNotBlank(rootStructureContentStyleClass)) { rootStructure.getContentRootPane().getStyleClass().setAll(rootStructureContentStyleClass.split(","));
/** * @{inheritedDoc} */ @Override public IOperationResult loadModel(IEmaginController controller, String compId) { this.controller = (AbstractViewController) controller; final StandardViewController standardViewController = (StandardViewController) controller; // this is the master final OperationData data = standardViewController.getStructureContent().getFormModelData(); final IOperation op = (IOperation) Services.getBean("DGetLatestVersionByMasterOidOperation"); final JsonObject query = new JsonObject(); // this is the master oid query.addProperty("oid", data.getAttributes().get("fullId").toString()); op.doOperation(query, r -> { // Because all actions to child controller should be done relative // to this! standardViewController.getStructureContent().setFormModelData((OperationData) r.rootData()); // this is the lastest version result = r; onModelLoadSuccess(r); }); return result; } }