[TYPO3-mvc] JSON - based View

Dennis Ahrens dennis.ahrens at googlemail.com
Tue Apr 24 17:55:43 CEST 2012


Hi Frank,

On 24.04.2012 17:37, Frank Gerards wrote:
> can I use this view without the mvc_extjs extension ?
> I use jQuery and my AJAXDispatcher (eID mechanism) to bootstrap Extbase and call the controller/action combination, so I don't need the extJS connection...

You can use it standalone. For some jQuery stuff in FE we do it like 
this in a controller that should support json output for the json format:

/**
  * Initializes the controllers view
  */
public function initializeView() {
   if ($this->request->getFormat() === 'json') {
     $this->view = 
$this->objectManager->create('Tx_MvcExtjs_MVC_View_JsonView');		
     $this->view->setControllerContext($this->controllerContext);
   }
}

There are no dependencies to mvc_extjs instead of the View itself.

regards
Dennis


More information about the TYPO3-project-typo3v4mvc mailing list