Tabnine Logo
SInstance.toStringDisplayDefault
Code IndexAdd Tabnine to your IDE (free)

How to use
toStringDisplayDefault
method
in
org.opensingular.form.SInstance

Best Java code snippets using org.opensingular.form.SInstance.toStringDisplayDefault (Showing top 3 results out of 315)

origin: org.opensingular/form-core

@Override
public TemplateModel get(String key) throws TemplateModelException {
  if ("toStringDisplayDefault".equals(key)) {
    return new SInstanceZeroArgumentMethodTemplate<>(getInstance(), key, i -> i.toStringDisplayDefault());
  } else if ("value".equals(key) || "getValue".equals(key)) {
    return new SInstanceZeroArgumentMethodTemplate<>(getInstance(), key, i -> getValue());
  } else if ("_inst".equals(key)) {
    Optional<Constructor<?>> constructor = Arrays.stream(getClass().getConstructors())
        .filter(c -> c.getParameterCount() == 1 && c.getParameterTypes()[0].isAssignableFrom(getInstance().getClass()))
        .findFirst();
    if (! constructor.isPresent()) {
      throw new SingularFormException(
          "Não foi encontrado o construtor " + getClass().getSimpleName() + "(SInstance)");
    }
    SInstanceTemplateModel<INSTANCE> newSelf;
    try {
      newSelf = (SInstanceTemplateModel<INSTANCE>) constructor.get().newInstance(getInstance());
    } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
      throw new SingularFormException("Erro instanciado _inst", e);
    }
    newSelf.invertedPriority = true;
    return newSelf;
  } else if ("toStringDisplay".equals(key)) {
    return new SInstanceZeroArgumentMethodTemplate<>(getInstance(), key, i -> i.toStringDisplay());
  }
  return null;
}
origin: org.opensingular/singular-form-core

pb.addAttribute(STypeAttachment.class, ATR_ALLOWED_FILE_TYPES);
pb.getType(SType.class).asAtr().displayString(ctx -> ctx.instance().toStringDisplayDefault());
origin: org.opensingular/form-core

pb.addAttribute(STypeAttachment.class, ATR_ALLOWED_FILE_TYPES);
pb.getType(SType.class).asAtr().displayString(ctx -> ctx.instance().toStringDisplayDefault());
org.opensingular.formSInstancetoStringDisplayDefault

Popular methods of SInstance

  • getDocument
    Retorna o documento ao qual pertence a instância atual.
  • getType
  • toStringDisplay
  • getId
    Retorna um ID único dentre as instâncias do mesmo documento. Um ID nunca é reutilizado, mesmo se a i
  • getAttributeValue
  • findNearest
    Returns the nearest SInstance for the given type in the form SInstance tree. The search is performed
  • setId
    Apenas para uso nas soluções de persistencia. Não deve ser usado fora dessa situação.
  • clearInstance
    Apaga os valores associados a instância. Se for uma lista ou composto, apaga os valores em profundid
  • getName
  • getParent
  • getValue
  • isEmptyOfData
    Retorna true se a instancia não conter nenhuma informação diferente de null. A pesquisa é feita em
  • getValue,
  • isEmptyOfData,
  • asAtr,
  • asAtrAnnotation,
  • asAtrProvider,
  • attachEventCollector,
  • detachEventCollector,
  • getDictionary,
  • getField,
  • getPathFromRoot

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for WebStorm
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