Some JToolBarHelper methods not recognized
Posted: Sun Feb 10, 2008 8:17 pm
While in the process of building a component for J!1.5, my forehead has developed a few bruises over adding certain buttons to the Admin toolbar.
So far, I've been able to add: title, deleteList, save, and cancel. However, attempting to use editNew or editNewX (as was shown in the MVC tutorial) results in the error "call to undefined function editnewx().
Perfectly willing to accept that I must have a typo somewhere, but has anyone else run into this and can point me in the general direction of where to look?
The specific view this occurs with, uses the following code:
If I comment out the editNewX and addNewX lines, the view displays as expected (of course, with only the delete button).
Any and all suggestions greatly appreciated.
So far, I've been able to add: title, deleteList, save, and cancel. However, attempting to use editNew or editNewX (as was shown in the MVC tutorial) results in the error "call to undefined function editnewx().
Perfectly willing to accept that I must have a typo somewhere, but has anyone else run into this and can point me in the general direction of where to look?
The specific view this occurs with, uses the following code:
Code: Select all
defined ('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
class RouteBidsViewRouteBids extends JView {
/**
* RouteBids View display method
* @return void
*/
function display($tpl = null)
{
JToolBarHelper::title( JText::_('Route Manager'), 'generic.png');
JToolBarHelper::deleteList();
JToolBarHelper::editNewX('edit');
JToolBarHelper::addNewX('add');
// Get data from the model
$items =& $this->get('Data'); // use the getData method of our model
$this->assignRef('items', $items); // push data into the view/template
parent::display($tpl); // invoke display
}
}
If I comment out the editNewX and addNewX lines, the view displays as expected (of course, with only the delete button).
Any and all suggestions greatly appreciated.