Adding Dynamic components @method addComponent @param {String} name @param {Constructor} Component @param {Element} container @param {Object} data (data attributes) @param {Object} children @param {Object} dataSet (Model for bindings)
559926
function addComponent(Component, options) {
                var name = options.name,
                    container = options.container;

                if (name === undefined) {
                    throw 'you have to define data.name for component.';
                } else if (container === undefined) {
                    throw 'You have to define container for component.';
                } else if (this.children[name] !== undefined) {
                    throw 'Component using name:' + name + '! already defined.';
                }
                var component = this.setComponent(Component, options),
                    instance = component.run(options.container);
                instance.setContext(this.context);
                this.children[name] = instance;
                return instance;
            }
1172759
void addChildToComponentAndTag(UIComponent child) {
        UIComponent myComponent = this.getComponentInstance();

        int indexOfNextChildTag = this.getIndexOfNextChildTag();
        if (indexOfNextChildTag > myComponent.getChildCount()) {
            indexOfNextChildTag = myComponent.getChildCount();
        }
        myComponent.getChildren().add(indexOfNextChildTag, child);
        this.addChild(child);
    }
860834
def add_component(self, component):
        '''
        
        '''
        if component not in self._components:
            self._components.append(component)
        else:  # Replace Component
            self._components[self._components.index(component)] = component
1133035
function collectComponent(component) {
    var name = component.constructor.name;
    (components[name] || (components[name] = [])).push(component);
  }
629161
public void addComponents(Container container, Vector<Component> vector)
    {
        int components = container.getComponentCount();
        int[] componentOrder = this.getComponentOrder(container);
        for (int i = 0; i < components; i++)
        {
            Component component = container.getComponent(componentOrder[i]);
            if (component instanceof JMenuBar)
                continue;   // Never print this
            if (component instanceof JScrollPane)
            {
                component = ((JScrollPane)component).getViewport().getView();
                if (!(component instanceof JTable))
                {
                    vector.add(component);
                    component = null;
                }
            }
            if (component instanceof JTable)
            {
                JComponent header = ((JTable)component).getTableHeader();
                if (header != null)
                    vector.add(header);
                vector.add(component);
                component = null;
            }
            if (component instanceof JToolBar)
            {
                vector.add(component);
                component = null;
            }
            if (component instanceof Container)
                this.addComponents(((Container)component), vector);
        }
    }
1184599
function(name, view) {
            view.parent = this;

            if (this.components[name] != null) {
                if (!_.isArray(this.components[name])) this.components[name] = [this.components[name]];
                this.components[name].push(view);
            } else {
                this.components[name] = view;
            }
            this.countComponents = this.countComponents + 1;
            return this;
        }
1006658
function addComponentNodeListener (node, eventName, handler) {
  /* istanbul ignore next */
  if (!node.componentOptions.listeners) {
    node.componentOptions.listeners = {};
  }

  mergeVNodeListeners(node.componentOptions.listeners, eventName, handler);
}
55338
function updateComponentData (
  componentId,
  newData,
  callback
) {
  if (!document || !document.taskCenter) {
    warn("Can't find available \"document\" or \"taskCenter\".");
    return
  }
  if (typeof document.taskCenter.updateData === 'function') {
    return document.taskCenter.updateData(componentId, newData, callback)
  }
  warn(("Failed to update component data (" + componentId + ")."));
}
1194180
protected function addComponent(IComponent $component, $name, $insertBefore = NULL)
	{
		if ($this->childControl) {
			throw new LogicException('child control for this cell has already been set, you cannot add another one');
		}

		/** @noinspection PhpInternalEntityUsedInspection */
		$this->row->addComponent($component, $name, $insertBefore);
		$this->childControl = $component;
	}
316782
public void add(Component component, boolean addRelationships) {
        if (component != null) {
            if (!component.getContainer().equals(getContainer())) {
                throw new IllegalArgumentException("Only components belonging to " + container.getName() + " can be added to this view.");
            }

            addElement(component, addRelationships);
        }
    }
1274341
private void initComponents(List<CmsSetupComponent> components) {

        for (CmsSetupComponent component : components) {
            CheckBox checkbox = new CheckBox();
            checkbox.setValue(component.isChecked());
            checkbox.setCaption(component.getName() + " - " + component.getDescription());
            checkbox.setDescription(component.getDescription());
            checkbox.setData(component);
            checkbox.setWidth("100%");
            m_components.addComponent(checkbox);
            m_componentCheckboxes.add(checkbox);
            m_componentMap.put(component.getId(), component);

        }
    }
21883
function (container) {
                if (container[parProp]) {
                    // back references already present, nothing to do
                    return;
                }
                // back references are not present yet
                container[parProp] = [];
                for (var childName in container) {
                    if (container.hasOwnProperty(childName) && __includePropForBackRef(childName)) {
                        var childValue = container[childName];
                        if (__isValidContainer(childValue)) {
                            this.__checkBackRefs(childValue);
                            // Add the container reference and property name to the child 'aria:parent' array
                            childValue[parProp].push({
                                parent : container,
                                property : childName
                            });
                            this.$raiseEvent({
                                name : 'aria-parent-metadata-added',
                                child: childValue,
                                parent: container,
                                property: childName
                            });
                        }
                    }
                }
            }
450908
function registerComponents(Vue, components) {
        for (var component in components) {
            registerComponent(Vue, component, components[component]);
        }
    }
374677
function(node, component){
		node.component = component;
		component.nodes.push(node);
		this.setComponentInfo(component);
	}
133798
function registerComponents(elemNames) {
    if (!elemNames) { return; }

    var elemNameDashCase, elemNameCamelCase;
    for (var i = 0; i < elemNames.length; i++) {
        elemNameDashCase = elemNames[i];
        elemNameCamelCase = utils.dashToCamelCase(elemNameDashCase);
        elems[elemNameCamelCase] = makeElem(elemNameDashCase);
    }
}
1089670
def _add_container(props_node, tag, container):
        
        values_node = ElementTree.SubElement(props_node, tag)
        for value in container:
            value_node = ElementTree.SubElement(values_node, TAG_VALUE)
            value_node.text = str(value)
1016359
function compileComponent(ComponentClass) {
    var proto = ComponentClass.prototype;

    // pre define components class
    /* istanbul ignore else  */
    if (!proto.hasOwnProperty('_cmptReady')) {
        proto.components = ComponentClass.components || proto.components || {};
        var components = proto.components;

        for (var key in components) { // eslint-disable-line
            var componentClass = components[key];

            if (typeof componentClass === 'object' && !(componentClass instanceof ComponentLoader)) {
                components[key] = defineComponent(componentClass);
            }
            else if (componentClass === 'self') {
                components[key] = ComponentClass;
            }
        }

        proto._cmptReady = 1;
    }


    // pre compile template
    /* istanbul ignore else  */
    if (!proto.hasOwnProperty('aNode')) {
        var aNode = parseTemplate(ComponentClass.template || proto.template, {
            trimWhitespace: proto.trimWhitespace || ComponentClass.trimWhitespace,
            delimiters: proto.delimiters || ComponentClass.delimiters
        });

        var firstChild = aNode.children[0];
        if (firstChild && firstChild.textExpr) {
            firstChild = null;
        }

        // #[begin] error
        if (aNode.children.length !== 1 || !firstChild) {
            warn('Component template must have a root element.');
        }
        // #[end]

        proto.aNode = firstChild = firstChild || {
            directives: {},
            props: [],
            events: [],
            children: []
        };

        if (firstChild.tagName === 'template') {
            firstChild.tagName = null;
        }

        if (proto.autoFillStyleAndId !== false && ComponentClass.autoFillStyleAndId !== false) {
            var componentPropExtra = {
                'class': {name: 'class', expr: parseText('{{class | _xclass}}')},
                'style': {name: 'style', expr: parseText('{{style | _xstyle}}')},
                'id': {name: 'id', expr: parseText('{{id}}')}
            };

            var len = firstChild.props.length;
            while (len--) {
                var prop = firstChild.props[len];
                var extra = componentPropExtra[prop.name];

                if (extra) {
                    firstChild.props.splice(len, 1);
                    componentPropExtra[prop.name] = prop;

                    if (prop.name !== 'id') {
                        prop.expr.segs.push(extra.expr.segs[0]);
                        prop.expr.value = null;
                    }
                }
            }

            firstChild.props.push(
                componentPropExtra['class'], // eslint-disable-line dot-notation
                componentPropExtra.style,
                componentPropExtra.id
            );
        }
    }
}