original_string: public function indexAction()
      {
          if ($this->getRequest()->isAjax()) {
              try {
                  $this->loadLayout(null, false, false);
                  $this->getLayout()->getUpdate()->setCacheId(null);
                  $this->getLayout()->getUpdate()->addHandle(strtolower($this->getFullActionName()) . '_AJAX');
              } catch (Exception $e) {
                  Mage::logException($e);
                  $this->getResponse()->setHeader('Content-Type', 'application/json');
                  $this->getResponse()->setBody(Zend_Json::encode(['error' => true, 'message' => $e->getMessage()]));
              }
          }
  
          $this->loadLayout();
          $this->renderLayout();
      }
code: public function indexAction()
      {
          if ($this->getRequest()->isAjax()) {
              try {
                  $this->loadLayout(null, false, false);
                  $this->getLayout()->getUpdate()->setCacheId(null);
                  $this->getLayout()->getUpdate()->addHandle(strtolower($this->getFullActionName()) . '_AJAX');
              } catch (Exception $e) {
                  Mage::logException($e);
                  $this->getResponse()->setHeader('Content-Type', 'application/json');
                  $this->getResponse()->setBody(Zend_Json::encode(['error' => true, 'message' => $e->getMessage()]));
              }
          }
  
          $this->loadLayout();
          $this->renderLayout();
      }
code_tokens: public function indexAction ( ) { if ( $ this -> getRequest ( ) -> isAjax ( ) ) { try { $ this -> loadLayout ( null , false , false ) ; $ this -> getLayout ( ) -> getUpdate ( ) -> setCacheId ( null ) ; $ this -> getLayout ( ) -> getUpdate ( ) -> addHandle ( strtolower ( $ this -> getFullActionName ( ) ) . '_AJAX' ) ; } catch ( Exception $ e ) { Mage :: logException ( $ e ) ; $ this -> getResponse ( ) -> setHeader ( 'Content-Type' , 'application/json' ) ; $ this -> getResponse ( ) -> setBody ( Zend_Json :: encode ( [ 'error' => true , 'message' => $ e -> getMessage ( ) ] ) ) ; } } $ this -> loadLayout ( ) ; $ this -> renderLayout ( ) ; }
docstring: List existing records via a grid
docstring_tokens: List existing records via a grid