5
が、私はjsのエラーバックエンドのアクションは、私はアクションを作成し、それをクリックしたとき
捕捉されない例外TypeErrorを得る動作しないbがあります未定義
(FFに)私のコードは次のとおりです。
view.html.php
<?// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
class ObshViewObsh extends JView
{
function display($tpl = null)
{
$task = JRequest::getVar('task', '');
switch($task){
case 'config': $this->config();break;
default: $this->windows();
}
parent::display($tpl);
}
function windows(){
JToolBarHelper::title(JText::_('Общежития'), 'generic.png');
JToolBarHelper::custom('config','options','','Настройки',false); //<<< --- this link doesn't work
}
function config(){
JToolBarHelper::title(JText::_('Общежития - настройка компонента'), 'generic.png');
JToolBarHelper::apply('edit_config');
JToolBarHelper::cancel('cancel');
}
}
controller.php
<?php
error_reporting(E_ALL);
// No direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controller');
class ObshController extends JController
{
function config(){
JRequest::setVar('view', 'obsh');
JRequest::setVar('layout', 'config' );
JRequest::setVar('hidemainmenu', 1);
parent::display();
}
}
にフォームを追加するのを忘れ...地獄のように簡単です