public function getTemplateDataByIdAction()
    {
        $request = $this->getRequest();
        $data    = array();

        if($request->isPost())
        {
            $templatesModel = $this->getServiceLocator()->get('MelisEngineTableTemplate');
            $templateId = $request->getPost('templateId');

            if(is_numeric($templateId))
                $data = $templatesModel->getEntryById($templateId);
        }

        return new JsonModel($data);
    }