Developing a MVC Component/Basic backend
From Joomla! Documentation
Revision as of 11:12, 25 June 2012 by SAbboushi
Items to be adding/changed on this page:
Shouldn't references to $db->getDBO() be changed to $db->getDbo() ?
And what is this comment referring to? "The _populateState method is, by default, automatically called when a state is read by the getState method."
Radiant tech 06:37, 1 September 2011 (CDT)
Admin Forms in J2.5
Aparently, for the JToolbar Icons to work properly in J2.5, the form elements need the id "adminForm" to be assigned to them. I changed this in admin/views/helloworlds/tmpl/default.php. However, it also needs to be changed in the packages...
The function declaration has been changed from
public function display($cachable=false)
public function display($cachable=false,$urlparams=false)
How to access backend component & task icons not displaying
The tutorial is unclear on how to access the backend component. I believe it would be helpful to explain that the component can be accessed in 2 ways:
2) The "hello-world" menu item under "Components" of the Administration application
I believe it would also be helpful to note that this component only does 2 things:
a) lists the two options stored in the database: id 1 (Hello World!) and id2 (Good bye World!)
b) allows us to use checkboxes to select one or both options
This model does not give us a toolbar (i.e. the toolbar is empty without icons) so that we can not save the selected option(s). So I can "check" id 1 (Hello World!) and/or id2 (Good bye World!), but then cannot "Save" since there are no task icons.
It was also not clear to me that the options we select with this backend component are the options that will then be available in the "Required Settings" section when Editing a Menu Item. i.e. when I add a Menu Item and select "Menu Item Type": "COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE" (part 06 site component), the "Required Settings" drop-down box will contain the options that were selected with this backend component (well, at least that WILL be the case when we have a toolbar that gives us a "Save" task icon which I believe is in Part 09) SAbboushi 6/25/2012