/** * * Generates {@link IBuildable} from given list of components. * * @param controller * @param components * @return {@link List} */ public static List<IBuildable> generate(AbstractViewController controller, List<VLViewComponentXML> resolved) { Assert.notNull(resolved); Assert.notNull(controller); List<IBuildable> result = new ArrayList<>(); for (VLViewComponentXML definition : resolved) { IBuildable buildable = generate(controller, definition); if (buildable != null) { result.add(buildable); } } return result; }
/** * List passed in parameter is a list where components have not been resolved, mean id is empty, ref * is not empty * * @param controller * @param components * @return */ public static List<IBuildable> resolveAndGenerate(AbstractViewController controller, List<VLViewComponentXML> components) { Assert.notNull(components); Assert.notNull(controller); final List<VLViewComponentXML> resolvedComponents = resolveDefinitions(controller, components); return generate(controller, resolvedComponents); }
links = ComponentUtils.generate(controller, filtered); final Iterator<IBuildable> iterator = links.iterator(); while (iterator.hasNext()) {
public void buildActions() { NodeHelper.setHVGrow(rightActionsLayout); rightActionsLayout.setAlignment(Pos.BOTTOM_RIGHT); rightActionsLayout.setSpacing(4); final VLViewComponentXML comp = ComponentUtils.resolveComponent(tabDefinition, ACTIONS_PATH); if (comp != null) { if (comp.hasSubComponent()) { final List<VLViewComponentXML> resolvedComponents = ComponentUtils.resolveDefinitions(controller, comp.getSubcomponents()); List<IBuildable> buildables = ComponentUtils.generate(controller, resolvedComponents); for (final IBuildable buildable : buildables) { rightActionsLayout.getChildren().add(buildable.getDisplay()); } } } }
private void build() { maximizedWrapper.getChildren().clear(); topToolbar.getChildren().clear(); NodeHelper.styleClassSetAll(maximizedWrapper, configuration, HEADER_RIGHT_TOOLBAR); NodeHelper.styleClassSetAll(customWrapper, configuration, HEADER_RIGHT_TOOLBAR); final Iterator<VLViewComponentXML> it = configuration.getSubcomponents().iterator(); while (it.hasNext()) { final VLViewComponentXML conf = it.next(); // can be reference or controller if (StringUtils.isNotBlank(conf.getController())) { final String controller = conf.getController(); final AbstractViewController viewController = StandardViewUtils.forId(this.controller.getRootStructure(), controller); maximizedWrapper.getChildren().add(viewController.processedView()); } else { final VLViewComponentXML resolved = ComponentUtils.resolveDefinition(controller, conf).orElse(null); if (resolved != null) { final IBuildable buildable = ComponentUtils.generate(controller, resolved); NodeHelper.setTransparentFocus(buildable.getDisplay()); maximizedWrapper.getChildren().addAll(buildable.getDisplay()); } } if (conf.isSeparatorAfter() && it.hasNext()) { maximizedWrapper.getChildren().addAll(NodeHelper.headerVerticalSeparator()); } } bottomToolbar.setVisible(false); ellispsys = ToolbarUtils.ellipsisVActionsButton(configuration, controller, null); animateAddMaximizedWrapper(); }