protected function OnSuccess()
    {
        $prevLayout = $this->page->GetLayout();
        
        $this->page->SetName($this->Value('Name'));
        $this->page->SetUrl($this->Value('Url'));
        $this->page->SetSite($this->site);
        $this->page->SetTitle($this->Value('Title'));
        $this->page->SetDescription($this->Value('Description'));
        $this->page->SetKeywords($this->Value('Keywords'));
        $newLayout = new Layout($this->Value('Layout'));
        $this->page->SetLayout($newLayout);
        $this->page->SetMenuAccess($this->Value('MenuAccess'));
        $this->page->SetGuestsOnly((bool)$this->Value('GuestsOnly'));
        $this->page->SetPublish((bool)$this->Value('Publish'));
        $this->page->SetPublishFrom($this->PublishDate('PublishFrom'));
        $this->page->SetPublishTo($this->PublishDate('PublishTo'));
        $relevance = (float)$this->Value('SitemapRelevance') / 10;
        $this->page->SetSitemapRelevance(min(max(0.0, $relevance), 1.0));
        $this->page->SetSitemapChangeFrequency($this->Value('SitemapChangeFrequency'));
        $this->SaveType();
        $action = Action::Update();
        if (!$this->page->Exists())
        {
            $action = Action::Create();
            $this->SaveNew();
        }
        else
        {
            $this->ReassignContents($prevLayout, $newLayout);
            $this->page->Save();
        }
        $logger = new Logger(self::Guard()->GetUser());
        $logger->ReportPageAction($this->page, $action);
        if ($this->CanAssignGroup())
        {
            $this->SaveRights();
        }
        $this->SaveMemberGroups();
        $this->AdjustHtaccess();
        Response::Redirect($this->BackLink());
    }