Actions

J2.5 talk

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

From Joomla! Documentation

(Icon name don't matchj)
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
This is just so overly complicated to implement MVC...
 
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.
 +
 +
== Joomla 3.x  ==
 +
 +
The code no longer works :
 +
 +
JToolBarHelper::deleteListX('', 'helloworlds.delete');
 +
JToolBarHelper::editListX('helloworld.edit');
 +
JToolBarHelper::addNewX('helloworld.add');
 +
 +
Use :
 +
JToolBarHelper::deleteList('', 'helloworlds.delete');
 +
JToolBarHelper::editList('helloworld.edit');
 +
JToolBarHelper::addNew('helloworld.add');
 +
 +
--[[User:Flashmath|Flashmath]] ([[User talk:Flashmath|talk]]) 04:25, 13 July 2013 (CDT)
 +
 +
== Icon names don't match ==
 +
 +
 +
 +
In the example there probably is an error:<br>
 +
In the admin/helloworld.php file<br>
 +
 +
"<br>
 +
// Set some global property<br>
 +
$document->addStyleDeclaration('.icon-48-helloworld {background-image: url(../media/com_helloworld/images/tux-48x48.png);}');<br>
 +
"<br>
 +
it should possible be:<br>
 +
$document->addStyleDeclaration('.icon-helloworld {background-image: url(../media/com_helloworld/images/tux-48x48.png);}');<br>
 +
<br>But i can't be sure about it cause i'm trying to follow this example under joomla3.2<br>
 +
and there are differances, some are natural as Legacy add to classname , others are not :-'(<br>

Latest revision as of 09:18, 31 December 2013

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.

Joomla 3.x

The code no longer works :

JToolBarHelper::deleteListX(, 'helloworlds.delete');
JToolBarHelper::editListX('helloworld.edit');
JToolBarHelper::addNewX('helloworld.add');

Use :

JToolBarHelper::deleteList(, 'helloworlds.delete');
JToolBarHelper::editList('helloworld.edit');
JToolBarHelper::addNew('helloworld.add');

--Flashmath (talk) 04:25, 13 July 2013 (CDT)

Icon names don't match

In the example there probably is an error:
In the admin/helloworld.php file

"
// Set some global property
$document->addStyleDeclaration('.icon-48-helloworld {background-image: url(../media/com_helloworld/images/tux-48x48.png);}');
"
it should possible be:
$document->addStyleDeclaration('.icon-helloworld {background-image: url(../media/com_helloworld/images/tux-48x48.png);}');

But i can't be sure about it cause i'm trying to follow this example under joomla3.2
and there are differances, some are natural as Legacy add to classname , others are not :-'(