/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { displayFullPath = configuration.getBooleanProperty("fullPath", false); }
public boolean filteringAlwaysShown() { return headerConfiguration.getBooleanProperty("filteringAlwaysShown", false); } }
@Override protected void loadFirstPage() { if (contentConfiguration != null) { final boolean loadFirstPage = contentConfiguration.getBooleanProperty("loadFirstPage", true); if (loadFirstPage) { forceLoadFirstPage(); } } }
public static boolean isAttributeMandatory(final VLViewComponentXML attrConfig) { final VLViewComponentXML displayConfig = attrConfig.getNullableComponentById(XMLConstants.VALIDATION_CONFIG); boolean mandatory = false; if (displayConfig != null) { mandatory = displayConfig.getBooleanProperty(XMLConstants.MANDATORY); } return mandatory; }
/** * Read property mandatory from config of attribute * * @param attrConfig * @return */ public boolean isAttributeMandatory() { final VLViewComponentXML displayConfig = getComponentById("ValidationConfig").orElse(null); if (displayConfig != null) { return displayConfig.getBooleanProperty(XMLConstants.MANDATORY, false); } return false; }
/** * @{inheritedDoc} */ @Override public void buildFrom(AbstractViewController controller, IToolbarHolder toolbarHolder) { super.buildFrom(controller, toolbarHolder); boolean selectableProp = configuration.getBooleanProperty("selectable"); this.selectable.set(selectableProp); if (ellypisMenu != null) { allOverWrapper.getChildren().add(ellypisMenu); } }
/** * @{inheritedDoc} */ @Override public void setRootConfig(VLViewComponentXML fieldsetListConfig) { boolean scroll = fieldsetListConfig.getBooleanProperty("scroll", true); if (scroll) { fieldsetBottomLayoutCenter.getChildren().add(scrollPane); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(contentLayout); } else { NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "styleClass", "fieldset-group-selector-top-tabed-content"); fieldsetBottomLayoutCenter.getChildren().add(contentLayout); } }
public static void setLabel(Labeled labeled, VLViewComponentXML configuration, AbstractViewController controller) { // title final boolean uppercase = configuration.getBooleanProperty(XMLConstants.UPPERCASE, false); final String titleLabel = configuration.getPropertyValue(XMLConstants.LABEL); final String translated = controller.getLocalised(titleLabel, configuration); labeled.setText(uppercase ? translated.toUpperCase() : translated); // tooltip final String tooltipLabel = configuration.getPropertyValue(XMLConstants.TOOLTIP); final String tooltipLabeltranslated = controller.getLocalised(tooltipLabel); labeled.setTooltip(new Tooltip(tooltipLabeltranslated)); }
protected void buildTableView() { tableView = new TableView<>(); final List<TableColumnBase> tableColumns = getTableColumns(); for(TableColumnBase t: tableColumns) { tableView.getColumns().add((TableColumn<ObjectModel, ?>) t); } // single or multiple, default is multiple final String selectionMode = configuration.getPropertyValue("selectionMode", "multiple"); if ("multiple".equalsIgnoreCase(selectionMode)) { tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); } else { tableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); } // displayTableIfEmpty displayTableIfEmpty = configuration.getBooleanProperty("displayTableIfEmpty", false); }
/** * @{inheritedDoc} */ @Override public void setRootConfig(VLViewComponentXML fieldsetListConfig) { this.fieldsetConfiguration = fieldsetListConfig; boolean scroll = fieldsetListConfig.getBooleanProperty("scroll", true); if (scroll) { fieldsetTopLayoutCenter.getChildren().add(scrollPane); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(contentLayout); scrollPane.setVbarPolicy(ScrollBarPolicy.NEVER); NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentStyleClass", "fieldset-group-selector-top-tabed-content"); } else { NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentStyleClass", "fieldset-group-selector-top-tabed-content"); fieldsetTopLayoutCenter.getChildren().add(contentLayout); } NodeHelper.styleClassAddAll(header, fieldsetConfiguration, "headerStyleClass", "fieldset-group-selector-top-tabed-header"); }
/** * Builds the listViewPaneHeader of the {@link Wizard}. */ protected void buildHeader() { String headerImpl = configuration.getPropertyValue(HEADER_IMPL, "WizardHeader"); boolean displayHeader = configuration.getBooleanProperty("displayHeader", true); if (displayHeader) { header = (IWizardHeader) Services.getBean(headerImpl); header.buildFrom(controller, configuration); Node node = header.getDisplay(); getChildren().add(node); AnchorPane.setTopAnchor(node, 0.0); AnchorPane.setLeftAnchor(node, 0.0); AnchorPane.setRightAnchor(node, 0.0); } }
private void dobuildStructureContent(PushStructureContentEvent event, VLViewComponentXML c) { final Object obj = this; setProcessing(); final boolean showBottomHeader = c.getBooleanProperty("showRootStructureHeader", true); event.setShowRootStructureHeader(showBottomHeader); final StructureContentController sc = StructureContentUtils.forId((RootStructureContentController) obj, getRootStructure(), event, c); sc.setScIdentifier(event.getViewId()); event.setProcessedContent(sc); views.add(event); sendUpdateCurrentLocation(); Platform.runLater(() -> display(event)); }
public static void setTitle(Labeled labeled, VLViewComponentXML configuration, AbstractViewController controller) { // title final boolean uppercase = configuration.getBooleanProperty(XMLConstants.UPPERCASE, false); final String titleLabel = configuration.getPropertyValue(XMLConstants.TITLE); if (StringUtils.isNotBlank(titleLabel)) { final String translated = controller.getLocalised(titleLabel, configuration); labeled.setText(uppercase ? translated.toUpperCase() : translated); } // tooltip final String tooltipLabel = configuration.getPropertyValue(XMLConstants.TOOLTIP); if (StringUtils.isNotBlank(tooltipLabel)) { final String tooltipLabeltranslated = controller.getLocalised(tooltipLabel); labeled.setTooltip(new Tooltip(tooltipLabeltranslated)); } }
/** * @{inheritedDoc} */ @Override public void setRootConfig(VLViewComponentXML fieldsetListConfig) { this.fieldsetConfiguration = fieldsetListConfig; boolean scroll = fieldsetListConfig.getBooleanProperty("scroll", true); if (scroll) { fieldsetTopLayoutCenter.getChildren().add(scrollPane); scrollPane.setFitToHeight(true); scrollPane.setFitToWidth(true); scrollPane.setContent(contentLayout); scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); NodeHelper.styleClassAddAll(scrollPane, fieldsetListConfig, "contentStyleClass", "fieldset-group-selector-top-tabed-content"); NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentLayoutStyleClass"); } else { NodeHelper.styleClassAddAll(contentLayout, fieldsetListConfig, "contentLayoutStyleClass", "fieldset-group-selector-top-tabed-content"); fieldsetTopLayoutCenter.getChildren().add(contentLayout); } NodeHelper.styleClassAddAll(header, fieldsetConfiguration, "headerStyleClass", "fieldset-group-selector-top-tabed-header"); }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.configuration = configuration; this.controller = (AbstractViewController) controller; NodeHelper.styleClassSetAll(this, configuration, "styleClass", WIZARD_STEP_CONTENT); // getStyleClass().add(WIZARD_STEP_CONTENT); String contentProcessorName = configuration.getProcessor(); if (StringUtils.isEmpty(contentProcessorName)) { contentProcessorName = "FormFieldsetListProcessor"; } IComponentProcessor componentProcessor = (IComponentProcessor) Services.getBean(contentProcessorName); if (componentProcessor == null) { throw new RuntimeException("Component processor not found : " + contentProcessorName); } Boolean displayGroupSelector = configuration.getBooleanProperty("displayGroupSelector", true); IFieldsetGroupLayout groupLayout = (IFieldsetGroupLayout) componentProcessor.process(controller, configuration); groupLayout.setDisplaySelectors(displayGroupSelector); fieldsets.addAll(groupLayout.getFieldsets()); getChildren().add(groupLayout.getDisplay()); }
/** * @{inheritedDoc} */ @Override public synchronized <T extends GenericEvent> void handle(T e) { super.handle(e); if (e.isA(CoreEvent.HeaderNavbarBackButtonClicked)) { boolean hasCustomActions = getRootComponent() != null && getRootComponent().getBooleanProperty("hasCustomHeaderActions"); if (!hasCustomActions) { HeaderNavbarSetStandardRightActions he = new HeaderNavbarSetStandardRightActions.Builder().build(); dispatchEvent(he); } } }
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); if(selectionContainer != null) { selectionContainer.managedProperty().bind(selectionContainer.visibleProperty()); selectionContainer.setVisible(false); } if (configuration != null) { boolean selectable = configuration.getBooleanProperty("selectable", false); selectableProperty().set(selectable); } Object o = ((StandardViewController) this.controller).processedElement(); if (o instanceof AbstractTableStructure) { tableConfig = ((AbstractTableStructure) o).getContentConfig(); iconClickHandler = tableConfig.getComponentById("IconClickHandler").orElse(null); } // when icon is clicked if(iconClickHandler != null) { buildIconClickHandler(); } // when icon is clicked buildIdentityClickHandler(); }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { status.addListener((ChangeListener<FolderTableViewStatus>) (observable, oldValue, newValue) -> { statusChanged(observable, oldValue, newValue); }); this.controller = (AbstractViewController) controller; this.configuration = configuration; bottomToolbar = new STVBottomToolbar(); NodeHelper.setHVGrow(this); NodeHelper.setHgrow(bottomToolbar); // selectable rows or not? final boolean selectable = configuration.getBooleanProperty(XMLConstants.SELECTABLE); this.selectable.set(selectable); buildTableView(); buildRightPane(); buildNoContentPane(); loadFirstPage(); }
@Override public void initFromConfiguration(IEmaginController controller, VLViewComponentXML componentConfiguration) { linkClass = componentConfiguration.getPropertyValue("linkClass"); linkConstraintName = componentConfiguration.getPropertyValue("linkConstraintName"); linkType = componentConfiguration.getPropertyValue("linkType"); masterLink = componentConfiguration.getBooleanProperty("masterLink", false); if (StringUtils.isNotBlank(linkType)) { loadAttributesDefinition(); } final String countOperation = componentConfiguration.getPropertyValue("countOperation"); if (StringUtils.isNotBlank(countOperation)) { this.countOperation = (IOperation) Services.getBean(countOperation); } final String paginateOperation = componentConfiguration.getPropertyValue("paginateOperation"); if (StringUtils.isNotBlank(paginateOperation)) { this.paginateOperation = (IOperation) Services.getBean(paginateOperation); } }
public static StructureContentController forId(RootStructureContentController rootStructureContentController, RootStructureController rootStructure, PushStructureContentEvent fromPush, VLViewComponentXML config) { Assert.notNull(rootStructure); Assert.notNull(config); String structureContentImpl = config.getPropertyValue("viewLayout"); boolean isWizard = config.getBooleanProperty("isWizardView", false); StructureContentController controller = (StructureContentController) Services.getBean(structureContentImpl); if (fromPush != null) { controller.setSourceEvent(fromPush); controller.setFormModelData((OperationData) fromPush.getModel()); controller.setForModelId(fromPush.getModelFullId()); } controller.setRootStructureContent(rootStructureContentController); controller.setRootStructure(rootStructure); // controller.setWizardView(isWizard); // must build config manually because it does not exist final VLViewConfigXML configXML = new VLViewConfigXML(); configXML.addEmptyRootContent(); VLViewComponentXML rootComp = configXML.getComponents().get(0); rootComp.setProperties(config.getProperties()); controller.initViewContext(configXML, rootStructure.getRootContext()); controller.setInitialized(true); controller.build(); return controller; }