public void buildNoContentPane() { noContentPaneConfiguration = null; List<VLViewComponentXML> comps = rootConfiguration.getComponentsById("NoContentPane"); if(comps.size() > 0) { for(VLViewComponentXML comp: comps) { if(StringUtils.isBlank(comp.getCriteria())) { noContentPaneConfiguration = comp; break; } else { boolean ok = controller.evaluateFilter(comp); if(ok) { noContentPaneConfiguration = comp; break; } } } } if (noContentPaneConfiguration != null) noContentPane = NoContentPaneHelper.buildFrom(controller, noContentPaneConfiguration); }
for(VLViewComponentXML comp : resolved) { if (comp.isFiltered()) { if (criteriaContext.isTrue(comp.getCriteria())) { filtered.add(comp);
String criteria = result.getCriteria(); if (StringUtils.isNotBlank(criteria)) { boolean crit = controller.evaluateFilter(result);
protected static void copySourcesAttributes(VLViewComponentXML referenced, VLViewComponentXML resolved) { if(referenced.getVisibleIf() != null) resolved.setVisibleIf(referenced.getVisibleIf()); if(referenced.getCriteria() != null && resolved.getCriteria() == null) resolved.setCriteria(referenced.getCriteria()); if(referenced.getSeparatorAfter() != null) resolved.setSeparatorAfter(referenced.getSeparatorAfter()); if(referenced.getResponsiveOrder() != null) resolved.setResponsiveOrder(referenced.getResponsiveOrder()); if(referenced.getMasterColumn() != null) resolved.setMasterColumn(referenced.getMasterColumn()); if (StringUtils.isNotBlank(referenced.getDefaultButton())) { if(!resolved.getProperties().containsKey("default")) resolved.getProperties().put("default", referenced.getDefaultButton()); } if (referenced.getComponentById(VALIDATOR) != null) { if (resolved.getComponentById(VALIDATOR) != null) { final Optional<VLViewComponentXML> comp = resolved.getComponentById(VALIDATOR); comp.ifPresent(c -> resolved.getSubcomponents().remove(c)); } final Optional<VLViewComponentXML> d = referenced.getComponentById(VALIDATOR); d.ifPresent(f -> resolved.getSubcomponents().add(f)); } }
String criteria = result.getCriteria(); if (StringUtils.isNotBlank(criteria)) { boolean crit = controller.evaluateFilter(result);
/** * @param wizardConfiguration * @return */ public boolean evaluateFilter(VLViewComponentXML configuration) { String criteria = configuration.getCriteria(); if (StringUtils.isNotBlank(criteria)) { final CriteriaEvaluatorImpl evaluatorImpl = new CriteriaEvaluatorImpl(); final VLViewFilterXML noeud = Services.resolveFilter(this, criteria); if (noeud != null) { return evaluatorImpl.evaluate(this, noeud, viewContext.getCriterias()); } else { if(viewContext.getCriterias() != null) { if(viewContext.getCriterias().containsFilter(criteria)){ return "true".equals(viewContext.getCriterias().filterValue(criteria)); } } } // a criteria have been declared // but developper has not declared an evaluator for it // so hide it return false; } return true; }
String criteria = actionConfig.getCriteria(); if (StringUtils.isNotBlank(criteria)) { boolean crit = controller.evaluateFilter(actionConfig);