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

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

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

origin: org.opensingular/form-core

  /** Se aplica somene se o tipo for da classe {@link STypeList} */
  @Override
  public boolean isApplicableFor(SType<?> type) {
    return type.isList();
  }
}
origin: org.opensingular/singular-form-core

  /** Se aplica somene se o tipo for da classe {@link STypeList} */
  @Override
  public boolean isApplicableFor(SType<?> type) {
    return type.isList();
  }
}
origin: org.opensingular/singular-server-commons

private HTMLComponentType resolveSelectionType(SType<?> s) {
  if (s.isList()) {
    SView view = ViewResolver.resolveView(s);
    if (view instanceof SMultiSelectionByCheckboxView) {
      return HTMLComponentType.CHECKBOX;
    } else if (view instanceof SMultiSelectionByPicklistView) {
      return HTMLComponentType.PICK_LIST;
    } else {
      return HTMLComponentType.MULTI_SELECT;
    }
  } else {
    return HTMLComponentType.SELECT;
  }
}
origin: org.opensingular/singular-requirement-commons

private HTMLComponentType resolveSelectionType(SType<?> s) {
  if (s.isList()) {
    SView view = ViewResolver.resolveView(s);
    if (view instanceof SMultiSelectionByCheckboxView) {
      return HTMLComponentType.CHECKBOX;
    } else if (view instanceof SMultiSelectionByPicklistView) {
      return HTMLComponentType.PICK_LIST;
    } else {
      return HTMLComponentType.MULTI_SELECT;
    }
  } else {
    return HTMLComponentType.SELECT;
  }
}
origin: org.opensingular/singular-requirement-module

private HTMLComponentType resolveSelectionType(SType<?> s) {
  if (s.isList()) {
    SView view = ViewResolver.resolveView(s);
    if (view instanceof SMultiSelectionByCheckboxView) {
      return HTMLComponentType.CHECKBOX;
    } else if (view instanceof SMultiSelectionByPicklistView) {
      return HTMLComponentType.PICK_LIST;
    } else {
      return HTMLComponentType.MULTI_SELECT;
    }
  } else {
    return HTMLComponentType.SELECT;
  }
}
origin: org.opensingular/singular-form-core

/**
 * Reads the attribute maxOccurs of the element tag and configures the SType with its maximum size
 * @param element The element tag
 * @param newType The SType that is represented by the element tag
 */
private static void readXsdOwnAttributeMaxOccurs(ElementReader element, SType<?> newType) {
  String value = element.getAttr("maxOccurs");
  if (value != null && !"unbounded".equalsIgnoreCase(value)) {
    int maxOccurs = Integer.parseInt(value);
    if (newType.isList()) {
      ((STypeList<?, ?>) newType).withMaximumSizeOf(maxOccurs);
    } 
  }
}
origin: org.opensingular/singular-form-core

public static boolean isListWithTableBound(SType<?> type) {
  return type.isList() && tableOpt(((STypeList<?, ?>) type).getElementsType()).isPresent();
}
origin: org.opensingular/form-core

private static void readXsdOwnAttributeMinOccurs(ElementReader element, SType<?> newType) {
  Integer minOccurs = element.getAttrInteger("minOccurs");
  if (minOccurs == null || minOccurs.intValue() == 1) {
    newType.asAtr().required();
    if (newType.isList()) {
      ((STypeList) newType).withMiniumSizeOf(1);
    }
  } else if (minOccurs.intValue() > 1) {
    if (newType.isList()) {
      ((STypeList) newType).withMiniumSizeOf(minOccurs);
    } else {
      throw new SingularFormException(element.errorMsgInvalidAttribute("minOccurs"));
    }
  }
}
origin: org.opensingular/singular-form-core

@Override
protected void extendSubReference() {
  if (getSuperType().isList()) {
    E type = (E) ((STypeList) getSuperType()).elementsType;
    if (type != null) {
      setElementsType(type);
    }
  }
}
origin: org.opensingular/singular-form-core

/**
 * Checks if the SType is a list or a composite and calls the right method to include the complex element on XSD
 * @param sType The SType that will be inserted on the XSD
 * @param element The parent element 
 */
private static void toXsdFromSType(SType<?> sType, MElement element) {
  if (sType.isList()) {
    toXsdFromList((STypeList<?, ?>) sType, element);
  } else if (sType.isComposite()) {
    toXsdFromComposite((STypeComposite<?>) sType, element);
  }
}

origin: org.opensingular/form-core

@Override
protected void extendSubReference() {
  if (getSuperType().isList()) {
    E type = (E) ((STypeList) getSuperType()).elementsType;
    if (type != null) {
      setElementsType(type);
    }
  }
}
origin: org.opensingular/singular-form-core

private static void readXsdOwnAttributeMinOccurs(ElementReader element, SType<?> newType) {
  Integer minOccurs = element.getAttrInteger("minOccurs");
  if (minOccurs == null || minOccurs == 1) {
    newType.asAtr().required();
    if (newType.isList()) {
      ((STypeList) newType).withMiniumSizeOf(1);
    }
  } else if (minOccurs.intValue() > 1) {
    if (newType.isList()) {
      ((STypeList) newType).withMiniumSizeOf(minOccurs);
    } else {
      throw new SingularFormException(element.errorMsgInvalidAttribute("minOccurs"), newType);
    }
  }
}
origin: org.opensingular/singular-form-wicket

protected void addInitialNumberOfLines(SType<?> currentType, SIList<?> list, ISupplier<? extends AbstractSViewListWithControls<?>> viewSupplier) {
  final AbstractSViewListWithControls<?> view = viewSupplier.get();
  if (currentType.isList() && list.isEmpty()) {
    for (int i = 0; i < view.getInitialNumberOfLines(); i++) {
      list.addNew();
    }
  }
}
origin: org.opensingular/singular-form-core

@SuppressWarnings("unchecked")
private static void realMapToSInstance(Map<Integer, Map<String, Object>> pojoReferenceDataMap, Object pojoDataMap, SInstance rootInstance, boolean strictMode) {
  SType<?> type = rootInstance.getType();
  if (type.isComposite()) {
    mapToSIComposite(pojoReferenceDataMap, (Map<String, Object>) pojoDataMap, (SIComposite) rootInstance, strictMode);
  } else if (type.isList()) {
    mapToSIList(pojoReferenceDataMap, (Map<String, Object>) pojoDataMap, (SIList<SInstance>) rootInstance, strictMode, type);
  } else {
    rootInstance.setValue(((Map<String, Object>) pojoDataMap).get(type.getNameSimple()));
  }
}
origin: org.opensingular/form-core

private boolean isInsideChildrenTypes(SType<?> type, String typeName) {
  if (type.getNameSimple().equals(typeName)) {
    return true;
  } else if (type.isComposite()) {
    for (SType<?> children : ((STypeComposite<?>) type).getFields()) {
      if (isInsideChildrenTypes(children, typeName)) {
        return true;
      }
    }
  } else if (type.isList()) {
    return isInsideChildrenTypes(((STypeList<?, ?>) type).getElementsType(), typeName);
  }
  return false;
}
origin: org.opensingular/singular-form-core

private boolean isInsideChildrenTypes(SType<?> type, String typeName) {
  if (type.getNameSimple().equals(typeName)) {
    return true;
  } else if (type.isComposite()) {
    for (SType<?> children : ((STypeComposite<?>) type).getFields()) {
      if (isInsideChildrenTypes(children, typeName)) {
        return true;
      }
    }
  } else if (type.isList()) {
    return isInsideChildrenTypes(((STypeList<?, ?>) type).getElementsType(), typeName);
  }
  return false;
}
origin: org.opensingular/singular-form-core

@Override
protected void doWriteOnCanvas(DocumentCanvas canvas, FlatViewContext context) {
  SIList<?> instance = context.getInstanceAs(SIList.class);
  SType<?> elementsType = instance.getElementsType();
  if (elementsType.isComposite() || elementsType.isList()) {
    doWriteCompositeOrListOnCanvas(canvas, context, instance, elementsType);
  } else {
    doWriteSimpleOnCanvas(canvas, context, instance);
  }
}
origin: org.opensingular/singular-form-core

/**
 * Verifica se o tipo e seu tipos internos (se existirem) extendem corretamente o tipo pai. Faz uma analise
 * recursiva para os subtipos.
 */
public AssertionsSType isExtensionCorrect() {
  SType<?> superType = getTarget().getSuperType();
  if (! (getTarget().isComposite() || getTarget().isList())) {
    throw new AssertionError(errorMsg("O tipo deve ser um composite"));
  }
  return isExtensionCorrect(superType);
}
origin: org.opensingular/form-wicket

protected void addMinimumSize(SType<?> currentType, SIList<?> list) {
  if (currentType.isList() && list.isEmpty()) {
    final STypeList<?, ?> tl = (STypeList<?, ?>) currentType;
    if (tl.getMinimumSize() != null) {
      for (int i = 0; i < tl.getMinimumSize(); i++) {
        list.addNew();
      }
    } else if (tl.isRequired()) {
      list.addNew();
    }
  }
}
origin: org.opensingular/singular-form-core

  private Boolean isChildWithSessionBreaker(SInstance a) {
    return (a.asAtrBootstrap().getColPreference(12) == 12 && a.getType().isComposite()
        && a.asAtr().getLabel() != null) || a.getType().isList();
  }
}
org.opensingular.formSTypeisList

Javadoc

Verificar se o tipo é um tipo lista ( STypeList).

Popular methods of SType

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

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • 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
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • From CI to AI: The AI layer in your organization
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