Esempio n. 1
0
 /**
  * @inheritDoc
  */
 public function processSignal()
 {
     $signal = $this->getSignal();
     parent::processSignal();
     if ($signal && ($this->snippetMode = $this->isAjax())) {
         Nette\Bridges\ApplicationLatte\UIRuntime::renderSnippets($this);
         $this->sendPayload();
     }
 }
Esempio n. 2
0
 /**
  * Invalidation
  * @throws BadRequestException
  */
 public function processSignal()
 {
     $signal = $this->getSignal();
     // If does not exist signal or is not Ajax request ,then redraw snippets
     if ((!$signal or empty($signal[0]) or !$this->isAjax()) and $this->layout != false) {
         $this->redrawControl("title");
         $this->redrawControl("content");
         $this->redrawControl("styles");
         $this->redrawControl("scripts");
     }
     try {
         parent::processSignal();
     } catch (BadRequestException $e) {
         if ($this->isAjax()) {
             $this->flashMessage($e->getMessage(), 'error');
             $this->sendPayload();
         } else {
             throw $e;
         }
     }
 }