Adds the given component as a child of this component. The tag is used to identify the child in a velocity
template.

@param component the component to add.
@param tag the tag used to identify the component.
@deprecated Use {@link WTemplate} instead.
481
@Deprecated
	void add(final WComponent component, final String tag) {
		add(component);
		component.setTag(tag);
	}
1158444
@Deprecated
	@Override
	public void setTag(final String tag) {
		ComponentModel model = getOrCreateComponentModel();
		model.setTag(tag);
	}
1305233
private void addClassFrameTag(Content contentTree) {
        HtmlTree frame = HtmlTree.IFRAME(configuration.topFile.getPath(), "classFrame",
                configuration.getText("doclet.Package_class_and_interface_descriptions"));
        frame.addStyle(HtmlStyle.rightIframe);
        contentTree.addContent(frame);
    }
620273
protected void addTag(IcyTag tag)
	{
		tags.put(tag.getName(), tag);
		fireTagParsed(this, tag);
	}
251304
private Template getTemplate(final WComponent component) {
		String templateUrl = url;

		if (templateUrl == null && component instanceof AbstractWComponent) {
			templateUrl = ((AbstractWComponent) component).getTemplate();
		}

		if (templateUrl != null) {
			try {
				return VelocityEngineFactory.getVelocityEngine().getTemplate(templateUrl);
			} catch (Exception ex) {
				// If the resource is not available (eg if the template does not
				// exist), paint using a default layout and inform the user
				// of what's going on in the html comments.
				LOG.warn("Could not open " + templateUrl, ex);

				try {
					return VelocityEngineFactory.getVelocityEngine().getTemplate(NO_TEMPLATE_LAYOUT);
				} catch (Exception e) {
					LOG.error("Failed to read no template layout", e);
				}
			}
		}

		return null;
	}
1273213
public void addTag(String tag) {
        if (this.tags == null) {
            tags = new ArrayList<String>();
        }
        this.tags.add(tag);
    }
14786
public void addToGroup(final T component) {
		ComponentGroupModel model = getOrCreateComponentModel();
		model.components.add(component);
		MemoryUtil.checkSize(model.components.size(), this.getClass().getSimpleName());
	}
1047459
public void addTag(Tag tag) {
    set(PackageMetadata.TAGS, concat(getTags(), singletonList(tag)));
  }
51104
public function check(DOMElement $template, Tag $tag)
	{
		$node = $template->getElementsByTagNameNS($this->namespaceURI, $this->elName)->item(0);

		if ($node)
		{
			throw new UnsafeTemplateException("Element '" . $node->nodeName . "' is disallowed", $node);
		}
	}
145999
public void updateComponentDumpTemplate(String template) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
	if (!hasAccess) throw new SecurityException("no access to update component setting");

	Element component = _getRootElement("component");
	// if(template.trim().length()>0)
	component.setAttribute("dump-template", template);
    }
1073969
public void registerTag(String name, FreeMarkerTag tag){
        configuration.setSharedVariable(name, tag);
        userTags.add(tag);
    }
979853
public void addTag(TagValue tag) {
    //int pos = 0;
    //while (pos < tags.size() && tags.get(pos).getId() < tag.getId()) pos++;
    //tags.add(pos, tag);
    tags.add(tag);
    if (!hashTagsId.containsKey(tag.getId())) {
      hashTagsId.put(tag.getId(), tag);
    }
    Tag t = TiffTags.getTag(tag.getId());
    if (t != null) {
      if (hashTagsName.containsKey(t.getName())) {
        hashTagsName.put(t.getName(), tag);
      }
    }
  }
168319
public void pushPairCurrentMatched(ElemTemplateElement template, int child)
  {
    m_currentMatchTemplates.push(template);
    m_currentMatchedNodes.push(child);
  }
152777
protected void appendInputTag(String tag) {
        final TagView previousInputTag = getInputTag();
        if (previousInputTag != null) {
            throw new IllegalStateException("Already has a INPUT tag in group.");
        }

        final TagView newInputTag = new TagView(getContext(), TagView.STATE_INPUT, tag);
        newInputTag.setOnClickListener(mInternalTagClickListener);
        addView(newInputTag);
    }
1280798
protected <T extends IComponent> void addComponent(Class<T> componentType, T component) {
        components.put(componentType, component);
    }
1051438
public SimpleHTMLTag addSubTag(SimpleHTMLTag tag) {
        if (tag == this) {
            throw new IllegalArgumentException("The tag cannot be its own parent");
        }

        if (subTags == null) {
            subTags = new ArrayList<>();
        }

        subTags.add(tag);

        return this;
    }
419139
@Override
	protected void onComponentTag(ComponentTag tag) {
		super.onComponentTag(tag);
		
		if(model.getObject().size() > 0) tag.append("class", "has-error", " ");
	}