Php &引用;“保存”&引用;取消“;etc.组件迁移后Joomla 3中的按钮不工作

Php &引用;“保存”&引用;取消“;etc.组件迁移后Joomla 3中的按钮不工作,php,sql,joomla,Php,Sql,Joomla,我正在将一个为2.5制作的组件迁移到Joomla 3.4。现在一切都很好,除了一件事:Joomla工具栏按钮在后端根本没有反应。有什么问题吗?它与Joomla 2.5配合得很好 // Set the toolbar $this->addToolBar(); // Display the template parent::display($tpl); } /** * Setting the toolbar */ protected function

我正在将一个为2.5制作的组件迁移到Joomla 3.4。现在一切都很好,除了一件事:Joomla工具栏按钮在后端根本没有反应。有什么问题吗?它与Joomla 2.5配合得很好

    // Set the toolbar
    $this->addToolBar();

    // Display the template
    parent::display($tpl);
}

/**
 * Setting the toolbar
 */

protected function addToolBar() 
    {
            JFactory::getApplication()->input->set('hidemainmenu', true);
            $isNew = ($this->item->id == 0);

            JToolBarHelper::title($isNew ? JText::_('New note') :   JText::_('Edit note'));
            JToolBarHelper::save('guestbook.save');
            JToolBarHelper::cancel('guestbook.cancel', $isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE');
    }

最终解决方案:表单id必须始终设置为“adminForm”。我也接受Mich.C的回答,这可能是id为“adminForm”很重要的原因之一,另一个原因可能是js问题。系统js可能无法正确加载。