@Override
 protected void handleChildTag() throws XMLStreamException, QuickFixException {
   ComponentDefRef ref = getDefRefHandler(getParentHandler()).getElement();
   // For now we only accept adding components to the default.
   if (AURA_HTML.equals(ref.getDescriptor().getQualifiedName())) {
     error("HTML tags are disallowed in attribute defaults, only components may be set.");
   }
   builder.addComponentRef(ref);
 }
Ejemplo n.º 2
0
  /** Expects either Set tags or ComponentDefRefs */
  @Override
  protected void handleChildTag() throws XMLStreamException, QuickFixException {

    String tag = getTagName();
    if (AttributeDefRefHandler.TAG.equalsIgnoreCase(tag)) {
      AttributeDefRefImpl attributeDefRef =
          new AttributeDefRefHandler<>(getParentHandler(), xmlReader, source).getElement();
      builder.setAttribute(attributeDefRef.getDescriptor(), attributeDefRef);
    } else {
      ComponentDefRef cdr = getDefRefHandler(getParentHandler()).getElement();
      if (cdr.isFlavorable() || cdr.hasFlavorableChild()) {
        builder.setHasFlavorableChild(true);
      }
      body.add(cdr);
    }
  }