congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SType.getDependentTypes
Code IndexAdd Tabnine to your IDE (free)

How to use
getDependentTypes
method
in
org.opensingular.form.SType

Best Java code snippets using org.opensingular.form.SType.getDependentTypes (Showing top 6 results out of 315)

origin: org.opensingular/form-core

private Set<SType<?>> getDependentTypesInternal() {
  if (dependentTypes == null) {
    return superType == null ? null : superType.getDependentTypes();
  }
  Set<SType<?>> resultSuper = superType.getDependentTypesInternal();
  if (resultSuper == null) {
    return dependentTypes;
  }
  Set<SType<?>> sum = new LinkedHashSet<>(resultSuper.size() + dependentTypes.size());
  sum.addAll(resultSuper);
  sum.addAll(dependentTypes);
  return sum;
}
origin: org.opensingular/form-wicket

private static Predicate<SInstance> isDependantOf(SInstance i) {
  return (x) -> i.getType().getDependentTypes().contains(x.getType());
}
origin: org.opensingular/singular-form-core

private Set<SType<?>> getDependentTypesInternal() {
  if (dependentTypes == null) {
    return superType == null ? null : superType.getDependentTypes();
  }
  Set<SType<?>> resultSuper = superType.getDependentTypesInternal();
  if (resultSuper == null) {
    return dependentTypes;
  }
  Set<SType<?>> sum = new LinkedHashSet<>(resultSuper.size() + dependentTypes.size());
  sum.addAll(resultSuper);
  sum.addAll(dependentTypes);
  return sum;
}
origin: org.opensingular/singular-form-core

private static Predicate<SInstance> isDependantOf(SInstance i) {
  return (x) -> i.getType().getDependentTypes().contains(x.getType());
}
origin: org.opensingular/singular-form-core

/**
 * Verifica se o tipo atual tem todos os tipos informados como campos dependentes e mais nenhum campo.
 */
public AssertionsSType dependentsTypesAre(SType<?>... types) {
  Set<SType<?>> expectedSet = new LinkedHashSet<>(Arrays.asList(types));
  Set<SType<?>> currentSet = getTarget().getDependentTypes();
  isDependentType(types);
  for (SType<?> type : types) {
    if (!currentSet.contains(type)) {
      throw new AssertionError(errorMsg("A lista de dependente de " + getTarget() + " não contêm " + type));
    }
  }
  for (SType<?> type : currentSet) {
    if (!expectedSet.contains(type)) {
      throw new AssertionError(errorMsg(
          "O tipo " + type + " foi encontrado como dependente de " + getTarget() +
              ", mas isso não era esperado"));
    }
  }
  return this;
}
origin: org.opensingular/form-wicket

private static void validate(Component component, AjaxRequestTarget target, SInstance fieldInstance) {
    if (!isSkipValidationOnRequest()) {
    final InstanceValidationContext validationContext;
    // Validação do valor do componente
    validationContext = new InstanceValidationContext();
    validationContext.validateSingle(fieldInstance);
    // limpa erros de instancias dependentes, e limpa o valor caso de este não seja válido para o provider
    for (SType<?> dependentType : fieldInstance.getType().getDependentTypes()) {
      fieldInstance
          .findNearest(dependentType)
          .ifPresent(it -> {
            it.getDocument().clearValidationErrors(it.getId());
            //Executa validações que dependem do valor preenchido
            if (!it.isEmptyOfData()) {
              validationContext.validateSingle(it);
            }
          });
    }
    WicketBuildContext
        .findNearest(component)
        .flatMap(ctx -> Optional.of(ctx.getRootContext()))
        .flatMap(ctx -> Optional.of(Stream.builder().add(ctx.getRootContainer()).add(ctx.getExternalContainer()).build()))
        .ifPresent(containers -> containers.forEach(container -> {
          updateValidationFeedbackOnDescendants(target, (MarkupContainer) container);
        }));
  }
}
org.opensingular.formSTypegetDependentTypes

Popular methods of SType

  • asAtr
  • getNameSimple
  • getName
  • asAtrProvider
  • getAttributeValue
  • isList
    Verificar se o tipo é um tipo lista ( STypeList).
  • getValidators
  • withView
  • asAtrBootstrap
  • getInstanceClass
  • isComposite
    Verificar se o tipo é um tipo composto ( STypeComposite).
  • getDictionary
  • isComposite,
  • getDictionary,
  • hasAttributeDefinedInHierarchy,
  • isDependentType,
  • isTypeOf,
  • newInstance,
  • addAttribute,
  • addDependentType,
  • addInstanceValidator

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • getSystemService (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • String (java.lang)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • JComboBox (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now