setParent method
Sets the component's parent.
It's not possible to make a parent-child loop. (its ancestor cannot be its child)
You should use it only with addChild on the parent's component.
Implementation
void setParent(String parentId) {
this.parentId = parentId;
}