Tabnine Logo
SType.isRequired
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.opensingular/singular-form-core

public boolean hasValidation() {
  return isRequired() ||
      getAttributeValue(SPackageBasic.ATR_REQUIRED_FUNCTION) != null ||
      hasValidationInternal();
}
origin: org.opensingular/form-core

public boolean hasValidation() {
  return isRequired() ||
      getAttributeValue(SPackageBasic.ATR_REQUIRED_FUNCTION) != null ||
      hasValidationInternal();
}
origin: org.opensingular/singular-form-core

private SView decideView(SInstance instance, SInstance simple, Provider provider) {
  int size = provider.load(ProviderContext.of(instance)).size();
  /*
   * Tamanho zero indica uma possivel carga condicional e/ou dinamica.
   * Nesse caso é mais produtente escolher combo: MSelecaoPorSelectView
   */
  if (size <= 3 && size != 0 && simple.getType().isRequired()) {
    return newInstance(SViewSelectionByRadio.class);
  }
  return newInstance(SViewSelectionBySelect.class);
}
origin: org.opensingular/form-core

private SView decideView(SInstance instance, SInstance simple, Provider provider) {
  int size = provider.load(ProviderContext.of(instance)).size();
  /*
   * Tamanho zero indica uma possivel carga condicional e/ou dinamica.
   * Nesse caso é mais produtente escolher combo: MSelecaoPorSelectView
   */
  if (size <= 3 && size != 0 && simple.getType().isRequired()) {
    return newInstance(SViewSelectionByRadio.class);
  }
  return newInstance(SViewSelectionBySelect.class);
}
origin: org.opensingular/singular-form-core

/**
 * Inserts the tag element on the XSD
 * @param sType The SType that will be represented by the tag element
 * @param parent The parent tag of the element
 * @return The tag element that was included on the XSD
 */
private static MElement addXsdElement(SType<?> sType, MElement parent) {
  MElement element = parent.addElementNS(XSD_NAMESPACE_URI, XSD_ELEMENT);
  if (sType.isList()) {
    return setXsdListElementDefinition(element, sType);
  } else {
    String typeName = getTypeName(sType);
    element.setAttribute("name", sType.getNameSimple());
    if (Collections.frequency(mapOfComposite.values(), typeName) > 1 || sType instanceof STypeSimple<?, ?>) {
      element.setAttribute("type", typeName);
    }
    if (sType instanceof STypeSimple<?, ?> && (!sType.isRequired() && !XSD_SCHEMA.equals(parent.getNodeName()))) {
      element.setAttribute("minOccurs", "0");
    }
  }
  return element;
}
org.opensingular.formSTypeisRequired

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).
  • getDependentTypes
  • isComposite,
  • getDependentTypes,
  • getDictionary,
  • hasAttributeDefinedInHierarchy,
  • isDependentType,
  • isTypeOf,
  • newInstance,
  • addAttribute,
  • addDependentType,
  • addInstanceValidator

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Permission (java.security)
    Legacy security code; do not use.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Best plugins for Eclipse
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