Actions

J2.5 talk

Difference between revisions of "Developing a MVC Component/Adding decorations to the backend"

From Joomla! Documentation

(Delete toolbar item shouldn't work: new section)
(Delete toolbar item shouldn't work)
Line 7: Line 7:
 
   JToolBarHelper::deleteListX('', 'helloworlds.delete');
 
   JToolBarHelper::deleteListX('', 'helloworlds.delete');
  
winds up calling HelloworldsModelHellowworlds->delete() through the controller/helloworlds.php controller.  which doesn't exist in this demo or in the base JModelList class.
+
winds up calling HelloworldsModelHellowworlds->delete() which is a function that doesn't exist in base JModelList class or it's descendant.
  
 
Clicking the delete button returns an error.
 
Clicking the delete button returns an error.
  
Should this be:
+
Changing this to:
  
 
   JToolBarHelper::deleteListX('', 'helloworld.delete');
 
   JToolBarHelper::deleteListX('', 'helloworld.delete');
 +
 +
results in the delete() function of a JModelAdmin object being called but it doesn't delete the record.

Revision as of 00:54, 19 September 2012

This is just so overly complicated to implement MVC...

Delete toolbar item shouldn't work

In the example code:

 JToolBarHelper::deleteListX(, 'helloworlds.delete');

winds up calling HelloworldsModelHellowworlds->delete() which is a function that doesn't exist in base JModelList class or it's descendant.

Clicking the delete button returns an error.

Changing this to:

 JToolBarHelper::deleteListX(, 'helloworld.delete');

results in the delete() function of a JModelAdmin object being called but it doesn't delete the record.