Sets a template of the component.

Argument can be template string or null - current content of the element will be used as the template.
function(template) {
		// unbind old models from old dom elements
		this.unbindAll();
		
		if(template == null) {
			// save template html
			this.template = this.domElement.innerHTML;
		}
		else {
			// set template string
			this.template = template;
		
			// fill element.innerHTML with the template
			//this.domElement.innerHTML = template;
			htmlToElem(this.domElement, this.template);
		}
		
		// set built flag as false
		this.built = false;
		
		// save template nodes
		this.templateNodes = [Array.prototype.slice.call(this.domElement.childNodes)];
	}