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

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

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

origin: org.opensingular/form-core

public static SInstanceViewState get(SInstance instance) {
  if (instance == null)
    return SInstanceViewState.HIDDEN;
  final boolean exists = instance.exists();
  final Boolean visible = SInstances.attributeValue(instance, SPackageBasic.ATR_VISIBLE, null);
  final Boolean enabled = SInstances.attributeValue(instance, SPackageBasic.ATR_ENABLED, null);
  if (exists) {
    if (visible != null && !visible) {
      return SInstanceViewState.HIDDEN;
    } else if (enabled != null && !enabled) {
      return SInstanceViewState.READONLY;
    } else {
      return SInstanceViewState.EDITABLE;
    }
  } else {
    if (visible != null && visible) {
      return SInstanceViewState.READONLY;
    } else {
      return SInstanceViewState.HIDDEN;
    }
  }
}
origin: org.opensingular/singular-form-core

public void updateExists() {
  SInstances.updateBooleanAttribute(this, SPackageBasic.ATR_EXISTS, SPackageBasic.ATR_EXISTS_FUNCTION);
  if (!exists())
    SInstances.visitPostOrder(this, (i, v) -> i.clearInstance());
}
origin: org.opensingular/singular-form-core

public static SInstanceViewState get(SInstance instance) {
  if (instance == null)
    return SInstanceViewState.HIDDEN;
  final boolean exists = instance.exists();
  final Boolean visible = SInstances.attributeValue(instance, SPackageBasic.ATR_VISIBLE, null);
  final Boolean enabled = SInstances.attributeValue(instance, SPackageBasic.ATR_ENABLED, null);
  if (exists) {
    if (visible != null && !visible) {
      return SInstanceViewState.HIDDEN;
    } else if (enabled != null && !enabled) {
      return SInstanceViewState.READONLY;
    } else {
      return SInstanceViewState.EDITABLE;
    }
  } else {
    if (visible != null && visible) {
      return SInstanceViewState.READONLY;
    } else {
      return SInstanceViewState.HIDDEN;
    }
  }
}
origin: org.opensingular/form-core

public void updateExists() {
  SInstances.updateBooleanAttribute(this, SPackageBasic.ATR_EXISTS, SPackageBasic.ATR_EXISTS_FUNCTION);
  if (!exists())
    SInstances.visitPostOrder(this, (i, v) -> i.clearInstance());
}
org.opensingular.formSInstanceexists

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

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top Vim 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