title: Backend action in Joomla doesn't work
body: <p>when i create action and then click on it, i get js error </p>
  
  <p>Uncaught TypeError: Cannot read property 'task' of undefined (in chrome)<br>
  TypeError: b is undefined (in ff)</p>
  
  <p>my code is:</p>
  
  <p>view.html.php</p>
  
  <pre><code>&lt;?// 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-&gt;config();break;
              default: $this-&gt;windows();
          }
  
          parent::display($tpl);
      }
  
      function windows(){
          JToolBarHelper::title( JText::_( 'Общежития' ), 'generic.png' ); 
          JToolBarHelper::custom('config','options','','Настройки',false); //&lt;&lt;&lt; --- this link doesn't work
  
      }
  
       function config(){
          JToolBarHelper::title( JText::_( 'Общежития - настройка компонента' ), 'generic.png' );
          JToolBarHelper::apply('edit_config');
          JToolBarHelper::cancel('cancel');    
      }          
  
  }
  </code></pre>
  
  <p>controller.php</p>
  
  <pre><code>&lt;?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();
      }        
  }
  </code></pre>