I'm currently developing a new administrator back-end component for Joomla, and I'm having difficulty getting the toolbar buttons to do what I need. I'll describe in brief the scenario, hopefully it'll make sense.
When you go to the component's 'home page' as it were by selecting it from the menu, a list of items/records is displayed (in similar fashion to static content manager), and then after selecting to edit one of those items it disables the main menu ok and takes you to a tabset of forms (a little like the joomla global configuration), and in this section the buttons to Save, Apply, Delete, Cancel etc all work fine. However- I also need to be able to add, edit and delete sub-items from buttons on the same toolbar which take you to other form screens, still while the main menu is disabled- and its these extra toolbar buttons that don't seem to do anything at all when clicked.
Code: Select all
in toolbar.componentname.html.php:
function _InviteEdit() {
mosMenuBar::startTable();
// these ones not working:
mosMenuBar::deleteList( '', 'guest_delete', 'Remove Guest' );
mosMenuBar::spacer();
mosMenuBar::addNewX( 'guest_edit', 'edit.png', 'edit_f2.png', 'Edit Guest', true );
mosMenuBar::spacer();
mosMenuBar::divider();
mosMenuBar::spacer();
// these ones working absolutely fine:
mosMenuBar::apply( 'invite_applyedit' );
mosMenuBar::spacer();
mosMenuBar::custom( 'invite_saveedit', 'save.png', 'save_f2.png', 'Save', false );
mosMenuBar::spacer();
mosMenuBar::cancel( 'invite_canceledit' );
mosMenuBar::spacer();
mosMenuBar::help( 'screen.componentname.invite_edit' );
mosMenuBar::endTable();
}