Some JToolBarHelper methods not recognized

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
radiant_tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Dec 15, 2007 3:02 pm
Location: Washington DC Metro

Some JToolBarHelper methods not recognized

Post by radiant_tech » 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:

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.
Denise

shahpound
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Jan 05, 2008 10:23 pm
Location: Cambridge, MA

Re: Some JToolBarHelper methods not recognized

Post by shahpound » Sun Feb 10, 2008 9:15 pm

I think you want the following:

JToolBarHelper::editListX();

radiant_tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Dec 15, 2007 3:02 pm
Location: Washington DC Metro

Re: Some JToolBarHelper methods not recognized

Post by radiant_tech » Sun Feb 10, 2008 9:52 pm

And there it is!  lol  I knew it was something simple.  Thanks!!
Denise


Post Reply