public function createComponent($instanceName, $instanceClass, $selfedit) {
        $this->selfedit = $selfedit;

        if ($selfedit == "true") {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }


        $this->moufManager->declareComponent($instanceName, $instanceClass);
        $this->moufManager->rewriteMouf();

        // Redirect to the display component page:
        $this->displayComponent($instanceName, $selfedit);
    }