<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lightinthedark</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lightinthedark"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Lightinthedark"/>
	<updated>2026-05-15T22:01:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Adding_ACL&amp;diff=64828</id>
		<title>Archived:Developing a MVC Component/Adding ACL</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Adding_ACL&amp;diff=64828"/>
		<updated>2012-02-10T12:05:51Z</updated>

		<summary type="html">&lt;p&gt;Lightinthedark: /* Further reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial is for {{JVer|1.7}}&lt;br /&gt;
&lt;br /&gt;
== Articles in this series ==&lt;br /&gt;
{{Chunk:Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Contents}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This tutorial is part of the [[Developing a Model-View-Controller (MVC) Component for Joomla!1.7]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
== Describing the ACL (Access Control List)==&lt;br /&gt;
Each component has its own ACL. They can be described in an &#039;&#039;access.xml&#039;&#039; file located at the root of the &#039;&#039;admin&#039;&#039; folder. This file describes the ACL for the com_helloworld component in a different section. In this example, we have chosen to separate the different ACL into two sections: components and messages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/access.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/access.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;access component=&amp;quot;com_helloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;component&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.admin&amp;quot; title=&amp;quot;JACTION_ADMIN&amp;quot; description=&amp;quot;JACTION_ADMIN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.manage&amp;quot; title=&amp;quot;JACTION_MANAGE&amp;quot; description=&amp;quot;JACTION_MANAGE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.create&amp;quot; title=&amp;quot;JACTION_CREATE&amp;quot; description=&amp;quot;JACTION_CREATE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;JACTION_DELETE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;JACTION_EDIT_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;message&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_DELETE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_EDIT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/access&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Restricting access to the component ==&lt;br /&gt;
&lt;br /&gt;
The main idea in ACL is to restrict actions to groups of users. The first action to be restricted is access to the component itself. With your favorite file editor, edit the &#039;&#039;admin/helloworld.php&#039;&#039; file and it these lines&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Access check.&lt;br /&gt;
if (!JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_helloworld&#039;)) &lt;br /&gt;
{&lt;br /&gt;
	return JError::raiseWarning(404, JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// require helper file&lt;br /&gt;
JLoader::register(&#039;HelloWorldHelper&#039;, dirname(__FILE__) . DS . &#039;helpers&#039; . DS . &#039;helloworld.php&#039;);&lt;br /&gt;
&lt;br /&gt;
// import joomla controller library&lt;br /&gt;
jimport(&#039;joomla.application.component.controller&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JController::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$controller-&amp;gt;execute(JRequest::getCmd(&#039;task&#039;));&lt;br /&gt;
 &lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Displaying only the right toolbar buttons ==&lt;br /&gt;
&lt;br /&gt;
The toolbar buttons that have to be displayed depend on the ACL rights.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;admin/views/helloworlds/view.html.php&#039;&#039;, put this code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/views/helloworlds/view.html.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla view library&lt;br /&gt;
jimport(&#039;joomla.application.component.view&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JView&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * HelloWorlds view display method&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null) &lt;br /&gt;
	{&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$items = $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$pagination = $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;items = $items;&lt;br /&gt;
		$this-&amp;gt;pagination = $pagination;&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Setting the toolbar&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar() &lt;br /&gt;
	{&lt;br /&gt;
		$canDo = HelloWorldHelper::getActions();&lt;br /&gt;
		JToolBarHelper::title(JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;), &#039;helloworld&#039;);&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;admin/views/helloworld/view.html.php&#039;&#039;, put this code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/views/helloworld/view.html.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla view library&lt;br /&gt;
jimport(&#039;joomla.application.component.view&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JView&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * display method of Hello view&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null) &lt;br /&gt;
	{&lt;br /&gt;
		// get the Data&lt;br /&gt;
		$form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		$item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
		$script = $this-&amp;gt;get(&#039;Script&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		// Assign the Data&lt;br /&gt;
		$this-&amp;gt;form = $form;&lt;br /&gt;
		$this-&amp;gt;item = $item;&lt;br /&gt;
		$this-&amp;gt;script = $script;&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Setting the toolbar&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar() &lt;br /&gt;
	{&lt;br /&gt;
		JRequest::setVar(&#039;hidemainmenu&#039;, true);&lt;br /&gt;
		$user = JFactory::getUser();&lt;br /&gt;
		$userId = $user-&amp;gt;id;&lt;br /&gt;
		$isNew = $this-&amp;gt;item-&amp;gt;id == 0;&lt;br /&gt;
		$canDo = HelloWorldHelper::getActions($this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
		JToolBarHelper::title($isNew ? JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW&#039;)&lt;br /&gt;
		                             : JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT&#039;), &#039;helloworld&#039;);&lt;br /&gt;
		// Built the actions for new and existing records.&lt;br /&gt;
		if ($isNew) &lt;br /&gt;
		{&lt;br /&gt;
			// For new records, check the create permission.&lt;br /&gt;
			if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CANCEL&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			if ($canDo-&amp;gt;get(&#039;core.edit&#039;))&lt;br /&gt;
			{&lt;br /&gt;
				// We can save the new record&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
&lt;br /&gt;
				// We can save this record, but check the create permission to see&lt;br /&gt;
				// if we can return to make a new one.&lt;br /&gt;
				if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
				{&lt;br /&gt;
					JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
					                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2copy&#039;, &#039;save-copy.png&#039;, &#039;save-copy_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AS_COPY&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CLOSE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$isNew = $this-&amp;gt;item-&amp;gt;id == 0;&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle($isNew ? JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;)&lt;br /&gt;
		                           : JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_EDITING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two files use the &#039;&#039;getActions&#039;&#039; method defined in the &#039;&#039;admin/helpers/helloworld.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;admin/helpers/helloworld.php&#039;&#039;, put this code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/helpers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/helpers/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld component helper.&lt;br /&gt;
 */&lt;br /&gt;
abstract class HelloWorldHelper&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Configure the Linkbar.&lt;br /&gt;
	 */&lt;br /&gt;
	public static function addSubmenu($submenu) &lt;br /&gt;
	{&lt;br /&gt;
		JSubMenuHelper::addEntry(JText::_(&#039;COM_HELLOWORLD_SUBMENU_MESSAGES&#039;),&lt;br /&gt;
		                         &#039;index.php?option=com_helloworld&#039;, $submenu == &#039;messages&#039;);&lt;br /&gt;
		JSubMenuHelper::addEntry(JText::_(&#039;COM_HELLOWORLD_SUBMENU_CATEGORIES&#039;),&lt;br /&gt;
		                         &#039;index.php?option=com_categories&amp;amp;view=categories&amp;amp;extension=com_helloworld&#039;,&lt;br /&gt;
		                         $submenu == &#039;categories&#039;);&lt;br /&gt;
		// set some global property&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;addStyleDeclaration(&#039;.icon-48-helloworld &#039; .&lt;br /&gt;
		                               &#039;{background-image: url(../media/com_helloworld/images/tux-48x48.png);}&#039;);&lt;br /&gt;
		if ($submenu == &#039;categories&#039;) &lt;br /&gt;
		{&lt;br /&gt;
			$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION_CATEGORIES&#039;));&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the actions&lt;br /&gt;
	 */&lt;br /&gt;
	public static function getActions($messageId = 0)&lt;br /&gt;
	{	&lt;br /&gt;
		jimport(&#039;joomla.access.access&#039;);&lt;br /&gt;
		$user	= JFactory::getUser();&lt;br /&gt;
		$result	= new JObject;&lt;br /&gt;
&lt;br /&gt;
		if (empty($messageId)) {&lt;br /&gt;
			$assetName = &#039;com_helloworld&#039;;&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			$assetName = &#039;com_helloworld.message.&#039;.(int) $messageId;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$actions = JAccess::getActions(&#039;com_helloworld&#039;, &#039;component&#039;);&lt;br /&gt;
		&lt;br /&gt;
		foreach ($actions as $action) {&lt;br /&gt;
			$result-&amp;gt;set($action-&amp;gt;name, $user-&amp;gt;authorise($action-&amp;gt;name, $assetName));&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adding permissions settings in the component preferences ==&lt;br /&gt;
Since we now use ACL rights in our component, we need to set them at the component level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/config.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting the value in the assets table ==&lt;br /&gt;
&lt;br /&gt;
In order to set asset for each message, we have to do two things.&lt;br /&gt;
&lt;br /&gt;
First, the &#039;core.edit&#039; ACL &amp;quot;right&amp;quot; is taken from the message itself, then from the component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/models/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla modelform library&lt;br /&gt;
jimport(&#039;joomla.application.component.modeladmin&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method override to check if you can edit an existing record.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param	array	$data	An array of input data.&lt;br /&gt;
	 * @param	string	$key	The name of the key for the primary key.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	boolean&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function allowEdit($data = array(), $key = &#039;id&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		// Check specific edit permission then general edit permission.&lt;br /&gt;
		return JFactory::getUser()-&amp;gt;authorise(&#039;core.edit&#039;, &#039;com_helloworld.message.&#039;.&lt;br /&gt;
		                                      ((int) isset($data[$key]) ? $data[$key] : 0))&lt;br /&gt;
		       or parent::allowEdit($data, $key);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Returns a reference to the a Table object, always creating it.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param	type	The table type to instantiate&lt;br /&gt;
	 * @param	string	A prefix for the table class name. Optional.&lt;br /&gt;
	 * @param	array	Configuration array for model. Optional.&lt;br /&gt;
	 * @return	JTable	A database object&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array()) &lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param	array	$data		Data for the form.&lt;br /&gt;
	 * @param	boolean	$loadData	True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 * @return	mixed	A JForm object on success, false on failure&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true) &lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&#039;com_helloworld.helloworld&#039;, &#039;helloworld&#039;,&lt;br /&gt;
		                        array(&#039;control&#039; =&amp;gt; &#039;jform&#039;, &#039;load_data&#039; =&amp;gt; $loadData));&lt;br /&gt;
		if (empty($form)) &lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	mixed	The data for the form.&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData() &lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&#039;com_helloworld.edit.helloworld.data&#039;, array());&lt;br /&gt;
		if (empty($data)) &lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Second, set the asset name, asset title and asset parent in the helloworld table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/tables/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla table library&lt;br /&gt;
jimport(&#039;joomla.database.table&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTable&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param object Database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db) &lt;br /&gt;
	{&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;) &lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;])) &lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded load function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       int $pk primary key&lt;br /&gt;
	 * @param       boolean $reset reset data&lt;br /&gt;
	 * @return      boolean&lt;br /&gt;
	 * @see JTable:load&lt;br /&gt;
	 */&lt;br /&gt;
	public function load($pk = null, $reset = true) &lt;br /&gt;
	{&lt;br /&gt;
		if (parent::load($pk, $reset)) &lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a registry.&lt;br /&gt;
			$params = new JRegistry;&lt;br /&gt;
			$params-&amp;gt;loadJSON($this-&amp;gt;params);&lt;br /&gt;
			$this-&amp;gt;params = $params;&lt;br /&gt;
			return true;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.message.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the parent asset id for the record&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId()&lt;br /&gt;
	{&lt;br /&gt;
		$asset = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		$asset-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		return $asset-&amp;gt;id;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
More information on actions, assets and ACL can be found on the following pages:&lt;br /&gt;
* [[ACL Tutorial for Joomla 1.6]]&lt;br /&gt;
* [[How to implement actions in your code]]&lt;br /&gt;
&lt;br /&gt;
== Packaging the component ==&lt;br /&gt;
&lt;br /&gt;
Content of your code directory&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_09#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_head.php|admin/views/helloworlds/tmpl/default_head.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_body.php|admin/views/helloworlds/tmpl/default_body.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_foot.php|admin/views/helloworlds/tmpl/default_foot.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/language/en-GB/en-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#admin/language/en-GB/en-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#language/en-GB/en-GB.ini|language/en-GB/en-GB.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-16x16.png&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-48x48.png&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a compressed file of this directory or directly download the [http://joomlacode.org/gf/download/frsrelease/11394/58412/com_helloworld-1.6-part14.zip archive] and install it using the extension manager of Joomla!1.7. You can add a menu item of this component using the menu manager in the backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;helloworld.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;1.7.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;November 2009&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.14&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New in 1.7 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;language&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Zips ==&lt;br /&gt;
Download the zip file for this Part:&lt;br /&gt;
[http://www.leyar.com/joomlaorg/part14.zip]&lt;br /&gt;
&lt;br /&gt;
== Navigate ==&lt;br /&gt;
[[Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Part 13|Prev: Adding configuration]]&lt;br /&gt;
[[Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Part 15|Next: Adding an install/uninstall/update script file]]&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[category:Joomla! 1.6]]&lt;br /&gt;
[[category:Joomla! 1.7]]&lt;br /&gt;
[[category:Manual]]&lt;/div&gt;</summary>
		<author><name>Lightinthedark</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Adding_ACL&amp;diff=64827</id>
		<title>Archived:Developing a MVC Component/Adding ACL</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Adding_ACL&amp;diff=64827"/>
		<updated>2012-02-10T12:01:56Z</updated>

		<summary type="html">&lt;p&gt;Lightinthedark: /* Setting the value in the assets table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial is for {{JVer|1.7}}&lt;br /&gt;
&lt;br /&gt;
== Articles in this series ==&lt;br /&gt;
{{Chunk:Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Contents}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This tutorial is part of the [[Developing a Model-View-Controller (MVC) Component for Joomla!1.7]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
== Describing the ACL (Access Control List)==&lt;br /&gt;
Each component has its own ACL. They can be described in an &#039;&#039;access.xml&#039;&#039; file located at the root of the &#039;&#039;admin&#039;&#039; folder. This file describes the ACL for the com_helloworld component in a different section. In this example, we have chosen to separate the different ACL into two sections: components and messages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/access.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/access.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;access component=&amp;quot;com_helloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;component&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.admin&amp;quot; title=&amp;quot;JACTION_ADMIN&amp;quot; description=&amp;quot;JACTION_ADMIN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.manage&amp;quot; title=&amp;quot;JACTION_MANAGE&amp;quot; description=&amp;quot;JACTION_MANAGE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.create&amp;quot; title=&amp;quot;JACTION_CREATE&amp;quot; description=&amp;quot;JACTION_CREATE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;JACTION_DELETE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;JACTION_EDIT_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;message&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_DELETE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_EDIT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/access&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Restricting access to the component ==&lt;br /&gt;
&lt;br /&gt;
The main idea in ACL is to restrict actions to groups of users. The first action to be restricted is access to the component itself. With your favorite file editor, edit the &#039;&#039;admin/helloworld.php&#039;&#039; file and it these lines&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Access check.&lt;br /&gt;
if (!JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_helloworld&#039;)) &lt;br /&gt;
{&lt;br /&gt;
	return JError::raiseWarning(404, JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// require helper file&lt;br /&gt;
JLoader::register(&#039;HelloWorldHelper&#039;, dirname(__FILE__) . DS . &#039;helpers&#039; . DS . &#039;helloworld.php&#039;);&lt;br /&gt;
&lt;br /&gt;
// import joomla controller library&lt;br /&gt;
jimport(&#039;joomla.application.component.controller&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JController::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$controller-&amp;gt;execute(JRequest::getCmd(&#039;task&#039;));&lt;br /&gt;
 &lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Displaying only the right toolbar buttons ==&lt;br /&gt;
&lt;br /&gt;
The toolbar buttons that have to be displayed depend on the ACL rights.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;admin/views/helloworlds/view.html.php&#039;&#039;, put this code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/views/helloworlds/view.html.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla view library&lt;br /&gt;
jimport(&#039;joomla.application.component.view&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JView&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * HelloWorlds view display method&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null) &lt;br /&gt;
	{&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$items = $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$pagination = $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;items = $items;&lt;br /&gt;
		$this-&amp;gt;pagination = $pagination;&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Setting the toolbar&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar() &lt;br /&gt;
	{&lt;br /&gt;
		$canDo = HelloWorldHelper::getActions();&lt;br /&gt;
		JToolBarHelper::title(JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;), &#039;helloworld&#039;);&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;admin/views/helloworld/view.html.php&#039;&#039;, put this code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/views/helloworld/view.html.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla view library&lt;br /&gt;
jimport(&#039;joomla.application.component.view&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JView&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * display method of Hello view&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null) &lt;br /&gt;
	{&lt;br /&gt;
		// get the Data&lt;br /&gt;
		$form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		$item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
		$script = $this-&amp;gt;get(&#039;Script&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		// Assign the Data&lt;br /&gt;
		$this-&amp;gt;form = $form;&lt;br /&gt;
		$this-&amp;gt;item = $item;&lt;br /&gt;
		$this-&amp;gt;script = $script;&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Setting the toolbar&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar() &lt;br /&gt;
	{&lt;br /&gt;
		JRequest::setVar(&#039;hidemainmenu&#039;, true);&lt;br /&gt;
		$user = JFactory::getUser();&lt;br /&gt;
		$userId = $user-&amp;gt;id;&lt;br /&gt;
		$isNew = $this-&amp;gt;item-&amp;gt;id == 0;&lt;br /&gt;
		$canDo = HelloWorldHelper::getActions($this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
		JToolBarHelper::title($isNew ? JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW&#039;)&lt;br /&gt;
		                             : JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT&#039;), &#039;helloworld&#039;);&lt;br /&gt;
		// Built the actions for new and existing records.&lt;br /&gt;
		if ($isNew) &lt;br /&gt;
		{&lt;br /&gt;
			// For new records, check the create permission.&lt;br /&gt;
			if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CANCEL&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			if ($canDo-&amp;gt;get(&#039;core.edit&#039;))&lt;br /&gt;
			{&lt;br /&gt;
				// We can save the new record&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
&lt;br /&gt;
				// We can save this record, but check the create permission to see&lt;br /&gt;
				// if we can return to make a new one.&lt;br /&gt;
				if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
				{&lt;br /&gt;
					JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
					                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			if ($canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2copy&#039;, &#039;save-copy.png&#039;, &#039;save-copy_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AS_COPY&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CLOSE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$isNew = $this-&amp;gt;item-&amp;gt;id == 0;&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle($isNew ? JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;)&lt;br /&gt;
		                           : JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_EDITING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two files use the &#039;&#039;getActions&#039;&#039; method defined in the &#039;&#039;admin/helpers/helloworld.php&#039;&#039; file&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;admin/helpers/helloworld.php&#039;&#039;, put this code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/helpers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/helpers/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld component helper.&lt;br /&gt;
 */&lt;br /&gt;
abstract class HelloWorldHelper&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Configure the Linkbar.&lt;br /&gt;
	 */&lt;br /&gt;
	public static function addSubmenu($submenu) &lt;br /&gt;
	{&lt;br /&gt;
		JSubMenuHelper::addEntry(JText::_(&#039;COM_HELLOWORLD_SUBMENU_MESSAGES&#039;),&lt;br /&gt;
		                         &#039;index.php?option=com_helloworld&#039;, $submenu == &#039;messages&#039;);&lt;br /&gt;
		JSubMenuHelper::addEntry(JText::_(&#039;COM_HELLOWORLD_SUBMENU_CATEGORIES&#039;),&lt;br /&gt;
		                         &#039;index.php?option=com_categories&amp;amp;view=categories&amp;amp;extension=com_helloworld&#039;,&lt;br /&gt;
		                         $submenu == &#039;categories&#039;);&lt;br /&gt;
		// set some global property&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;addStyleDeclaration(&#039;.icon-48-helloworld &#039; .&lt;br /&gt;
		                               &#039;{background-image: url(../media/com_helloworld/images/tux-48x48.png);}&#039;);&lt;br /&gt;
		if ($submenu == &#039;categories&#039;) &lt;br /&gt;
		{&lt;br /&gt;
			$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION_CATEGORIES&#039;));&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the actions&lt;br /&gt;
	 */&lt;br /&gt;
	public static function getActions($messageId = 0)&lt;br /&gt;
	{	&lt;br /&gt;
		jimport(&#039;joomla.access.access&#039;);&lt;br /&gt;
		$user	= JFactory::getUser();&lt;br /&gt;
		$result	= new JObject;&lt;br /&gt;
&lt;br /&gt;
		if (empty($messageId)) {&lt;br /&gt;
			$assetName = &#039;com_helloworld&#039;;&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			$assetName = &#039;com_helloworld.message.&#039;.(int) $messageId;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$actions = JAccess::getActions(&#039;com_helloworld&#039;, &#039;component&#039;);&lt;br /&gt;
		&lt;br /&gt;
		foreach ($actions as $action) {&lt;br /&gt;
			$result-&amp;gt;set($action-&amp;gt;name, $user-&amp;gt;authorise($action-&amp;gt;name, $assetName));&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $result;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adding permissions settings in the component preferences ==&lt;br /&gt;
Since we now use ACL rights in our component, we need to set them at the component level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/config.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting the value in the assets table ==&lt;br /&gt;
&lt;br /&gt;
In order to set asset for each message, we have to do two things.&lt;br /&gt;
&lt;br /&gt;
First, the &#039;core.edit&#039; ACL &amp;quot;right&amp;quot; is taken from the message itself, then from the component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/models/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla modelform library&lt;br /&gt;
jimport(&#039;joomla.application.component.modeladmin&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method override to check if you can edit an existing record.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param	array	$data	An array of input data.&lt;br /&gt;
	 * @param	string	$key	The name of the key for the primary key.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	boolean&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function allowEdit($data = array(), $key = &#039;id&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		// Check specific edit permission then general edit permission.&lt;br /&gt;
		return JFactory::getUser()-&amp;gt;authorise(&#039;core.edit&#039;, &#039;com_helloworld.message.&#039;.&lt;br /&gt;
		                                      ((int) isset($data[$key]) ? $data[$key] : 0))&lt;br /&gt;
		       or parent::allowEdit($data, $key);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Returns a reference to the a Table object, always creating it.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param	type	The table type to instantiate&lt;br /&gt;
	 * @param	string	A prefix for the table class name. Optional.&lt;br /&gt;
	 * @param	array	Configuration array for model. Optional.&lt;br /&gt;
	 * @return	JTable	A database object&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array()) &lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param	array	$data		Data for the form.&lt;br /&gt;
	 * @param	boolean	$loadData	True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 * @return	mixed	A JForm object on success, false on failure&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true) &lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&#039;com_helloworld.helloworld&#039;, &#039;helloworld&#039;,&lt;br /&gt;
		                        array(&#039;control&#039; =&amp;gt; &#039;jform&#039;, &#039;load_data&#039; =&amp;gt; $loadData));&lt;br /&gt;
		if (empty($form)) &lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	mixed	The data for the form.&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData() &lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&#039;com_helloworld.edit.helloworld.data&#039;, array());&lt;br /&gt;
		if (empty($data)) &lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Second, set the asset name, asset title and asset parent in the helloworld table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/tables/helloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// import Joomla table library&lt;br /&gt;
jimport(&#039;joomla.database.table&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTable&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param object Database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db) &lt;br /&gt;
	{&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;) &lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;])) &lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded load function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       int $pk primary key&lt;br /&gt;
	 * @param       boolean $reset reset data&lt;br /&gt;
	 * @return      boolean&lt;br /&gt;
	 * @see JTable:load&lt;br /&gt;
	 */&lt;br /&gt;
	public function load($pk = null, $reset = true) &lt;br /&gt;
	{&lt;br /&gt;
		if (parent::load($pk, $reset)) &lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a registry.&lt;br /&gt;
			$params = new JRegistry;&lt;br /&gt;
			$params-&amp;gt;loadJSON($this-&amp;gt;params);&lt;br /&gt;
			$this-&amp;gt;params = $params;&lt;br /&gt;
			return true;&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.message.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the parent asset id for the record&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 * @since	1.7&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId()&lt;br /&gt;
	{&lt;br /&gt;
		$asset = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		$asset-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		return $asset-&amp;gt;id;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
More information on actions, assets and ACL can be found [[How_to_implement_actions_in_your_code|here]]&lt;br /&gt;
&lt;br /&gt;
== Packaging the component ==&lt;br /&gt;
&lt;br /&gt;
Content of your code directory&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_09#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_head.php|admin/views/helloworlds/tmpl/default_head.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_body.php|admin/views/helloworlds/tmpl/default_body.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_foot.php|admin/views/helloworlds/tmpl/default_foot.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/language/en-GB/en-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#admin/language/en-GB/en-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#language/en-GB/en-GB.ini|language/en-GB/en-GB.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-16x16.png&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-48x48.png&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a compressed file of this directory or directly download the [http://joomlacode.org/gf/download/frsrelease/11394/58412/com_helloworld-1.6-part14.zip archive] and install it using the extension manager of Joomla!1.7. You can add a menu item of this component using the menu manager in the backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;helloworld.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;1.7.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;November 2009&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.14&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New in 1.7 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;language&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Zips ==&lt;br /&gt;
Download the zip file for this Part:&lt;br /&gt;
[http://www.leyar.com/joomlaorg/part14.zip]&lt;br /&gt;
&lt;br /&gt;
== Navigate ==&lt;br /&gt;
[[Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Part 13|Prev: Adding configuration]]&lt;br /&gt;
[[Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Part 15|Next: Adding an install/uninstall/update script file]]&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[category:Joomla! 1.6]]&lt;br /&gt;
[[category:Joomla! 1.7]]&lt;br /&gt;
[[category:Manual]]&lt;/div&gt;</summary>
		<author><name>Lightinthedark</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Developer_Email_lists&amp;diff=64515</id>
		<title>Developer Email lists</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Developer_Email_lists&amp;diff=64515"/>
		<updated>2012-01-27T12:15:41Z</updated>

		<summary type="html">&lt;p&gt;Lightinthedark: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Development Mailing Lists ==&lt;br /&gt;
&lt;br /&gt;
Four mailing lists are available to help facilitate discussion amongst the Joomla! development community. &lt;br /&gt;
&lt;br /&gt;
End users are encouraged to use the [http://forum.joomla.org Joomla! forums] to seek assistance and [http://forum.joomla.org/viewforum.php?f=500&amp;amp;sid=4de52df54a0a6ba258ed9df371b6e604 propose ideas for future development]. Please understand that these mailing lists are strictly reserved for developers who create Joomla! extensions and write core code. In advance, thanks for respecting the guidelines.&lt;br /&gt;
&lt;br /&gt;
=== Joomla General Development ===&lt;br /&gt;
 &lt;br /&gt;
This list relates to general topics about Joomla development, including development of third-party extensions. The types of discussions one might find here could include issues related to creating a router for a new component, or how to use the JForms API introduced in 1.6, or problems migrating a 1.0.x extension to Joomla! 1.5. &lt;br /&gt;
&lt;br /&gt;
The [http://groups.google.com/group/joomla-dev-general Joomla General Development] list is a place for developers in the community to interact with one another, to ask and answer questions, find collaborators on project ideas, and consider how changes in coming versions might impact extensions. &lt;br /&gt;
&lt;br /&gt;
From these discussions, it is hoped that developers might summarize important topics and learning material and share that information with other developers on the Wiki.&lt;br /&gt;
&lt;br /&gt;
If you are a Joomla! developer who creates third party extensions or participates in Joomla! core development, you are welcome to sign up for this email list at [http://groups.google.com/group/joomla-dev-general Joomla General Development] list.&lt;br /&gt;
&lt;br /&gt;
=== Joomla CMS Development ===&lt;br /&gt;
&lt;br /&gt;
This list relates specifically to developing Joomla! core CMS code. Questions about impact on extensions should be asked in [http://groups.google.com/group/joomla-dev-general Joomla General Development] list. End user questions on how to use the CMS or share ideas on improvements should be directed to the Joomla! forums.&lt;br /&gt;
&lt;br /&gt;
Following the January 2009 Joomla! Developer Coordinator Summit, a [http://community.joomla.org/blogs/leadership/724-development-coordinator-summit-summary.html list of &amp;quot;strongly desired&amp;quot; items] for 1.6 was shared, along with an invitation to third party developers to take an item and contribute the feature to the core CMS. Discussions related to the development of those items are good examples of the type of discussion one might find in this list.&lt;br /&gt;
&lt;br /&gt;
If you are a Joomla! developer who contributes core CMS code, including items on the &amp;quot;strongly desired&amp;quot; list, please sign up for the [http://groups.google.com/group/joomla-dev-cms Joomla! CMS Development] list.&lt;br /&gt;
&lt;br /&gt;
=== Joomla Platform Development === &lt;br /&gt;
&lt;br /&gt;
This list is open to those who contribute code for the Joomla Platform.  End user, extension and CMS development questions should not be asked on this list.  Discussions in this list will focus on platform development.  [http://groups.google.com/group/joomla-dev-platform Joomla Platform Development]&lt;br /&gt;
&lt;br /&gt;
=== Joomla Bugsquad === &lt;br /&gt;
&lt;br /&gt;
The [http://groups.google.com/group/joomlabugsquad Joomla Bugsquad] can be read by anyone, but is restricted for posting to working members of the Joomla! Bug Squad. If you are interested in joining the Joomla! Bugsquad, contact [http://community.joomla.org/preview/author/68-ian-maclennan.html Ian] or [http://community.joomla.org/magazine/author/75-mark-dexter.html Mark].&lt;br /&gt;
&lt;br /&gt;
== Deprecated Lists ==&lt;br /&gt;
&lt;br /&gt;
The following lists are deprecated. They are included on this page for completeness, and because you may still find answers to your questions in the archives.&lt;br /&gt;
&lt;br /&gt;
=== Joomla Framework Development === &lt;br /&gt;
&lt;br /&gt;
[http://groups.google.com/group/joomla-dev-framework/browse_thread/thread/db799d27e0714c46 Deprecation notice]&lt;br /&gt;
&lt;br /&gt;
This list is open to those who contribute code for the Joomla! core Framework. End user and extension development questions should not be asked on this list. &lt;br /&gt;
&lt;br /&gt;
Discussions in this list will focus on core libraries, or new framework development. This group has a strong link with all that is going to be worked on in the group that will be working on research [http://groups.google.com/group/joomla-dev-framework Joomla Framework Development] list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List Etiquette ==&lt;br /&gt;
&lt;br /&gt;
It is not anticipated that a strict set of rules will be needed for the developer lists. Participants are  expected to comply with the [http://www.joomla.org/about-joomla/the-project/code-of-conduct.html Joomla Code of Conduct]. &lt;br /&gt;
&lt;br /&gt;
Time is a precious commodity for everyone. It is appreciated when questions are researched properly, prior to asking questions, and if community members help one another. It is especially appreciated when people take a bit of time to document a solution and share that with others on the Wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category:Working Groups]]&lt;/div&gt;</summary>
		<author><name>Lightinthedark</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Example_of_a_frontend_update_function&amp;diff=64381</id>
		<title>Archived:Developing a MVC Component/Example of a frontend update function</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Example_of_a_frontend_update_function&amp;diff=64381"/>
		<updated>2012-01-24T09:40:34Z</updated>

		<summary type="html">&lt;p&gt;Lightinthedark: /* Basic frontend form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial is for {{JVer|1.7}}&lt;br /&gt;
== Warning - this article needs to be reviewed by someone who knows what they&#039;re doing ==&lt;br /&gt;
&lt;br /&gt;
== Articles in this series ==&lt;br /&gt;
{{Chunk:Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Contents}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This tutorial is part of the [[Developing a Model-View-Controller (MVC) Component for Joomla!1.7]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
== Basic frontend form ==&lt;br /&gt;
Designing the frontend interface leads us to create a Model-View-Controller triptych similar to the backend in Part 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The rest of this subsection may be wrong. Check the [[{{TALKPAGENAME}}|discussion page]] for details.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We have to create an entry point of our component, the &#039;&#039;site/updhelloworld.php&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/updhelloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/updhelloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
 &lt;br /&gt;
// import joomla controller library&lt;br /&gt;
jimport(&#039;joomla.application.component.controller&#039;);&lt;br /&gt;
 &lt;br /&gt;
// Get an instance of the controller prefixed by UpdHelloWorld&lt;br /&gt;
$controller = JController::getInstance(&#039;UpdHelloWorld&#039;);&lt;br /&gt;
 &lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$controller-&amp;gt;execute(JRequest::getCmd(&#039;task&#039;));&lt;br /&gt;
 &lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create the specific controller ==&lt;br /&gt;
The entry point now gets an instance of an &#039;&#039;UpdHelloWorld&#039;&#039; prefixed controller which extends the function of JControllerForm. Let&#039;s create a basic controllerform for the site part:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/controllers/updhelloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/controllers/updhelloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
// No direct access.&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
// Include dependancy of the main controllerform class&lt;br /&gt;
jimport(&#039;joomla.application.component.controllerform&#039;);&lt;br /&gt;
&lt;br /&gt;
class HelloWorldControllerUpdHelloWorld extends JControllerForm&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	public function getModel($name = &#039;&#039;, $prefix = &#039;&#039;, $config = array(&#039;ignore_request&#039; =&amp;gt; true))&lt;br /&gt;
	{&lt;br /&gt;
		return parent::getModel($name, $prefix, array(&#039;ignore_request&#039; =&amp;gt; false));&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function submit()&lt;br /&gt;
	{&lt;br /&gt;
		// Check for request forgeries.&lt;br /&gt;
		JRequest::checkToken() or jexit(JText::_(&#039;JINVALID_TOKEN&#039;));&lt;br /&gt;
&lt;br /&gt;
		// Initialise variables.&lt;br /&gt;
		$app	= JFactory::getApplication();&lt;br /&gt;
		$model	= $this-&amp;gt;getModel(&#039;updhelloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Get the data from the form POST&lt;br /&gt;
		$data = JRequest::getVar(&#039;jform&#039;, array(), &#039;post&#039;, &#039;array&#039;);&lt;br /&gt;
&lt;br /&gt;
        // Now update the loaded data to the database via a function in the model&lt;br /&gt;
        $upditem	= $model-&amp;gt;updItem($data);&lt;br /&gt;
&lt;br /&gt;
    	// check if ok and display appropriate message.  This can also have a redirect if desired.&lt;br /&gt;
        if ($upditem) {&lt;br /&gt;
            echo &amp;quot;&amp;lt;h2&amp;gt;Updated Greeting has been saved&amp;lt;/h2&amp;gt;&amp;quot;;&lt;br /&gt;
        } else {&lt;br /&gt;
            echo &amp;quot;&amp;lt;h2&amp;gt;Updated Greeting failed to be saved&amp;lt;/h2&amp;gt;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This controller will display the appropriate message after the form is submitted.&lt;br /&gt;
&lt;br /&gt;
== Create the view ==&lt;br /&gt;
&lt;br /&gt;
With your favorite file manager and editor, create a file &#039;&#039;site/views/updhelloworld/view.html.php&#039;&#039; containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/updhelloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/views/updhelloworld/view.html.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
 &lt;br /&gt;
// import Joomla view library&lt;br /&gt;
jimport(&#039;joomla.application.component.view&#039;);&lt;br /&gt;
 &lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the UpdHelloWorld Component&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewUpdHelloWorld extends JView&lt;br /&gt;
{&lt;br /&gt;
	// Overwriting JView display method&lt;br /&gt;
	function display($tpl = null) &lt;br /&gt;
	{&lt;br /&gt;
		$app		= JFactory::getApplication();&lt;br /&gt;
		$params		= $app-&amp;gt;getParams();&lt;br /&gt;
		$dispatcher = JDispatcher::getInstance();&lt;br /&gt;
&lt;br /&gt;
		// Get some data from the models&lt;br /&gt;
		$state		= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		$item		= $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
		$this-&amp;gt;form	= $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Joomla, views display data using a layout. With your favorite file manager and editor, put a file &#039;&#039;site/views/updhelloworld/tmpl/default.php&#039;&#039; containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/updhelloworld/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/views/updhelloworld/tmpl/default.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;behavior.keepalive&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidation&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.tooltip&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
    &amp;lt;h2&amp;gt;Update the Hello World greeting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;form class=&amp;quot;form-validate&amp;quot; action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php&#039;); ?&amp;gt;&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;updhelloworld&amp;quot; name=&amp;quot;updhelloworld&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&amp;gt;&lt;br /&gt;
        	&amp;lt;dl&amp;gt;&lt;br /&gt;
          	    &amp;lt;dt&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getLabel(&#039;id&#039;); ?&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
             	&amp;lt;dd&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getInput(&#039;id&#039;); ?&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
        	    &amp;lt;dt&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getLabel(&#039;greeting&#039;); ?&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
        	    &amp;lt;dd&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getInput(&#039;greeting&#039;); ?&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
            	&amp;lt;dd&amp;gt;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_helloworld&amp;quot; /&amp;gt;&lt;br /&gt;
            	    &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;updhelloworld.submit&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                &amp;lt;dd&amp;gt;&amp;lt;button type=&amp;quot;submit&amp;quot; class=&amp;quot;button&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;Submit&#039;); ?&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
			                &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/dd&amp;gt;&lt;br /&gt;
        	&amp;lt;/dl&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;clr&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This layout utilises the forms design which resides with the related model.  The getLabel and getInput will pickup the xml fields defined and display appropriately.  More on the xml file within the models section of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Create a file &#039;&#039;site/views/updhelloworld/tmpl/default.xml&#039;&#039; containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/updhelloworld/tmpl/default.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/views/updhelloworld/tmpl/default.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables a menu option to be allocated to the frontend form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the model ==&lt;br /&gt;
The &#039;&#039;UpdHelloWorld&#039;&#039; model sets up the data through from the related form and allows the mechanism to save the subsequent data loaded into the form into the database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/updhelloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/models/updhelloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
 &lt;br /&gt;
// Include dependancy of the main model form&lt;br /&gt;
jimport(&#039;joomla.application.component.modelform&#039;);&lt;br /&gt;
// import Joomla modelitem library&lt;br /&gt;
jimport(&#039;joomla.application.component.modelitem&#039;);&lt;br /&gt;
// Include dependancy of the dispatcher&lt;br /&gt;
jimport(&#039;joomla.event.dispatcher&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * UpdHelloWorld Model&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelUpdHelloWorld extends JModelForm&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var object item&lt;br /&gt;
	 */&lt;br /&gt;
	protected $item;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the data for a new qualification&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
&lt;br /&gt;
        $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
        // Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&#039;com_helloworld.updhelloworld&#039;, &#039;updhelloworld&#039;, array(&#039;control&#039; =&amp;gt; &#039;jform&#039;, &#039;load_data&#039; =&amp;gt; true));&lt;br /&gt;
		if (empty($form)) {&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		return $form;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
	 * @return object The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	function &amp;amp;getItem()&lt;br /&gt;
	{&lt;br /&gt;
&lt;br /&gt;
		if (!isset($this-&amp;gt;_item))&lt;br /&gt;
		{&lt;br /&gt;
			$cache = JFactory::getCache(&#039;com_helloworld&#039;, &#039;&#039;);&lt;br /&gt;
			$id = $this-&amp;gt;getState(&#039;helloworld.id&#039;);&lt;br /&gt;
			$this-&amp;gt;_item =  $cache-&amp;gt;get($id);&lt;br /&gt;
			if ($this-&amp;gt;_item === false) {&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;_item;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function updItem($data)&lt;br /&gt;
	{&lt;br /&gt;
        // set the variables from the passed data&lt;br /&gt;
        $id = $data[&#039;id&#039;];&lt;br /&gt;
        $greeting = $data[&#039;greeting&#039;];&lt;br /&gt;
&lt;br /&gt;
        // set the data into a query to update the record&lt;br /&gt;
		$db		= $this-&amp;gt;getDbo();&lt;br /&gt;
		$query	= $db-&amp;gt;getQuery(true);&lt;br /&gt;
        $query-&amp;gt;clear();&lt;br /&gt;
		$query-&amp;gt;update(&#039; #__helloworld &#039;);&lt;br /&gt;
		$query-&amp;gt;set(&#039; greeting = &#039;.$db-&amp;gt;Quote($greeting) );&lt;br /&gt;
		$query-&amp;gt;where(&#039; id = &#039; . (int) $id );&lt;br /&gt;
&lt;br /&gt;
		$db-&amp;gt;setQuery((string)$query);&lt;br /&gt;
&lt;br /&gt;
        if (!$db-&amp;gt;query()) {&lt;br /&gt;
            JError::raiseError(500, $db-&amp;gt;getErrorMsg());&lt;br /&gt;
        	return false;&lt;br /&gt;
        } else {&lt;br /&gt;
        	return true;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following file &#039;&#039;updhelloworld.xml&#039;&#039; should be created using your favourite editor and saved in the forms folder under the models directory.  The first of the fields being referenced id using the sql type so that I returns the results from the query into a dropdown list form to be selected.&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/updhelloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/models/forms/updhelloworld.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form name=&amp;quot;updhelloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset name=&amp;quot;updhelloworld&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
            name=&amp;quot;id&amp;quot;&lt;br /&gt;
            type=&amp;quot;sql&amp;quot;&lt;br /&gt;
            multiple=&amp;quot;false&amp;quot;&lt;br /&gt;
            size=&amp;quot;1&amp;quot;&lt;br /&gt;
            label=&amp;quot;COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_ID&amp;quot;&lt;br /&gt;
            description=&amp;quot;COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_ID&amp;quot;&lt;br /&gt;
            query=&amp;quot;select id, greeting from #__helloworld&amp;quot;&lt;br /&gt;
            key_field=&amp;quot;id&amp;quot;&lt;br /&gt;
            value_field=&amp;quot;greeting&amp;quot;&lt;br /&gt;
            default=&amp;quot;0&amp;quot;&lt;br /&gt;
			required=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_ID&amp;lt;/option&amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
            name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
            type=&amp;quot;text&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_GREETING&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_GREETING&amp;quot;&lt;br /&gt;
			required=&amp;quot;true&amp;quot;&lt;br /&gt;
			size=&amp;quot;50&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adding some language keys ==&lt;br /&gt;
&lt;br /&gt;
This file provides the text link between the label in the model form definition to be displayed in the view.  And being for the frontend, it resides in the site folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/language/en-GB/en-GB.com_helloworld.ini&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_ID=&amp;quot;Greeting ID&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_ID=&amp;quot;This is the ID of the Greeting record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_GREETING=&amp;quot;Greeting description&amp;quot;&lt;br /&gt;
JOPTION_SELECT_ID=&amp;quot; -- Select Greeting to Update -- &amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the last 2 lines to the &#039;&#039;admin/language/en-GB/en-GB.com_helloworld.sys.ini&#039;&#039; file to provide the text link for the menu type display.  And being for the backend, it resides in the admin language folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/language/en-GB/en-GB.com_helloworld.sys.ini&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_INSTALL_TEXT=&amp;quot;HelloWorld Install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld postlight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld postflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld postflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld postflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld preflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld preflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld preflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld preflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UNINSTALL_TEXT=&amp;quot;HelloWorld Uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDATE_TEXT=&amp;quot;HelloWorld Update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Update the Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;Update greeting here&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;_populateState&#039;&#039; method is, by default, automatically called when a state is read by the &#039;&#039;getState&#039;&#039; method.&lt;br /&gt;
&lt;br /&gt;
== Packaging the component ==&lt;br /&gt;
&lt;br /&gt;
Content of your code directory-&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/updhelloworld.php|site/updhelloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/controllers/updhelloworld.php|site/controllers/updhelloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/controllers/index.html|site/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/views/updhelloworld/view.html.php|site/views/updhelloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/updhelloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/views/updhelloworld/tmpl/default.xml|site/views/updhelloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/views/updhelloworld/tmpl/default.php|site/views/updhelloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/models/updhelloworld.php|site/models/updhelloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/models/forms/updhelloworld.xml|site/models/forms/updhelloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_09#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_head.php|admin/views/helloworlds/tmpl/default_head.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_body.php|admin/views/helloworlds/tmpl/default_body.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_foot.php|admin/views/helloworlds/tmpl/default_foot.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/language/en-GB/en-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/language/en-GB/en-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#language/en-GB/en-GB.ini|language/en-GB/en-GB.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-16x16.png&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-48x48.png&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a compressed file of this directory or directly download the [http://joomlacode.org/gf/download/frsrelease/11394/58397/com_helloworld-1.6-part07.zip archive] and install it using the extension manager of Joomla!1.7. You can add a menu item of this component using the menu manager in the backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;helloworld.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;1.7.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting conttraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;November 2009&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.18&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 1.7 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New in 1.7 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;updhelloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;language&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;!-- UPDATESERVER DEFINITION --&amp;gt;&lt;br /&gt;
	&amp;lt;updateservers&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note: No spaces or linebreaks allowed between the server tags --&amp;gt;&lt;br /&gt;
		&amp;lt;server type=&amp;quot;extension&amp;quot; priority=&amp;quot;1&amp;quot; name=&amp;quot;HelloWorld Update Site&amp;quot;&amp;gt;http://yourdomain.com/update/helloworld-update.xml&amp;lt;/server&amp;gt;&lt;br /&gt;
	&amp;lt;/updateservers&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can see in your component &#039;&#039;&#039;hello-world&#039;&#039;&#039; an array with two colums, two rows and checkboxes. You can click the checkboxes in order to select the different options you want.&lt;br /&gt;
&lt;br /&gt;
== Zips ==&lt;br /&gt;
Download the zip file for this Part:&lt;br /&gt;
[http://www.glennarkell.com/joomlaorg/com_helloworld_0.0.18.zip]&lt;br /&gt;
&lt;br /&gt;
== Navigate ==&lt;br /&gt;
&lt;br /&gt;
[[Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Part 17|Prev: Adding an update server]]&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
*[[User:garkell|Glenn Arkell]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[category:Joomla! 1.6]]&lt;br /&gt;
[[category:Joomla! 1.7]]&lt;br /&gt;
[[category:Manual]]&lt;/div&gt;</summary>
		<author><name>Lightinthedark</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Example_of_a_frontend_update_function&amp;diff=64380</id>
		<title>Archived:Developing a MVC Component/Example of a frontend update function</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Developing_a_MVC_Component/Example_of_a_frontend_update_function&amp;diff=64380"/>
		<updated>2012-01-24T09:38:43Z</updated>

		<summary type="html">&lt;p&gt;Lightinthedark: /* Basic frontend form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial is for {{JVer|1.7}}&lt;br /&gt;
== Warning - this article needs to be reviewed by someone who knows what they&#039;re doing ==&lt;br /&gt;
&lt;br /&gt;
== Articles in this series ==&lt;br /&gt;
{{Chunk:Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Contents}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This tutorial is part of the [[Developing a Model-View-Controller (MVC) Component for Joomla!1.7]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
== Basic frontend form ==&lt;br /&gt;
Designing the frontend interface leads us to create a Model-View-Controller triptych similar to the backend in Part 7.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This may be wrong. Check the [[{{TALKPAGENAME}}|discussion page]] for details.&#039;&#039;&#039;&lt;br /&gt;
We have to create an entry point of our component, the &#039;&#039;site/updhelloworld.php&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/updhelloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/updhelloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
 &lt;br /&gt;
// import joomla controller library&lt;br /&gt;
jimport(&#039;joomla.application.component.controller&#039;);&lt;br /&gt;
 &lt;br /&gt;
// Get an instance of the controller prefixed by UpdHelloWorld&lt;br /&gt;
$controller = JController::getInstance(&#039;UpdHelloWorld&#039;);&lt;br /&gt;
 &lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$controller-&amp;gt;execute(JRequest::getCmd(&#039;task&#039;));&lt;br /&gt;
 &lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Create the specific controller ==&lt;br /&gt;
The entry point now gets an instance of an &#039;&#039;UpdHelloWorld&#039;&#039; prefixed controller which extends the function of JControllerForm. Let&#039;s create a basic controllerform for the site part:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/controllers/updhelloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/controllers/updhelloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
// No direct access.&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die;&lt;br /&gt;
&lt;br /&gt;
// Include dependancy of the main controllerform class&lt;br /&gt;
jimport(&#039;joomla.application.component.controllerform&#039;);&lt;br /&gt;
&lt;br /&gt;
class HelloWorldControllerUpdHelloWorld extends JControllerForm&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	public function getModel($name = &#039;&#039;, $prefix = &#039;&#039;, $config = array(&#039;ignore_request&#039; =&amp;gt; true))&lt;br /&gt;
	{&lt;br /&gt;
		return parent::getModel($name, $prefix, array(&#039;ignore_request&#039; =&amp;gt; false));&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function submit()&lt;br /&gt;
	{&lt;br /&gt;
		// Check for request forgeries.&lt;br /&gt;
		JRequest::checkToken() or jexit(JText::_(&#039;JINVALID_TOKEN&#039;));&lt;br /&gt;
&lt;br /&gt;
		// Initialise variables.&lt;br /&gt;
		$app	= JFactory::getApplication();&lt;br /&gt;
		$model	= $this-&amp;gt;getModel(&#039;updhelloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Get the data from the form POST&lt;br /&gt;
		$data = JRequest::getVar(&#039;jform&#039;, array(), &#039;post&#039;, &#039;array&#039;);&lt;br /&gt;
&lt;br /&gt;
        // Now update the loaded data to the database via a function in the model&lt;br /&gt;
        $upditem	= $model-&amp;gt;updItem($data);&lt;br /&gt;
&lt;br /&gt;
    	// check if ok and display appropriate message.  This can also have a redirect if desired.&lt;br /&gt;
        if ($upditem) {&lt;br /&gt;
            echo &amp;quot;&amp;lt;h2&amp;gt;Updated Greeting has been saved&amp;lt;/h2&amp;gt;&amp;quot;;&lt;br /&gt;
        } else {&lt;br /&gt;
            echo &amp;quot;&amp;lt;h2&amp;gt;Updated Greeting failed to be saved&amp;lt;/h2&amp;gt;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
		return true;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This controller will display the appropriate message after the form is submitted.&lt;br /&gt;
&lt;br /&gt;
== Create the view ==&lt;br /&gt;
&lt;br /&gt;
With your favorite file manager and editor, create a file &#039;&#039;site/views/updhelloworld/view.html.php&#039;&#039; containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/updhelloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/views/updhelloworld/view.html.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
 &lt;br /&gt;
// import Joomla view library&lt;br /&gt;
jimport(&#039;joomla.application.component.view&#039;);&lt;br /&gt;
 &lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the UpdHelloWorld Component&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewUpdHelloWorld extends JView&lt;br /&gt;
{&lt;br /&gt;
	// Overwriting JView display method&lt;br /&gt;
	function display($tpl = null) &lt;br /&gt;
	{&lt;br /&gt;
		$app		= JFactory::getApplication();&lt;br /&gt;
		$params		= $app-&amp;gt;getParams();&lt;br /&gt;
		$dispatcher = JDispatcher::getInstance();&lt;br /&gt;
&lt;br /&gt;
		// Get some data from the models&lt;br /&gt;
		$state		= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		$item		= $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
		$this-&amp;gt;form	= $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Joomla, views display data using a layout. With your favorite file manager and editor, put a file &#039;&#039;site/views/updhelloworld/tmpl/default.php&#039;&#039; containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/updhelloworld/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/views/updhelloworld/tmpl/default.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;behavior.keepalive&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidation&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.tooltip&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
    &amp;lt;h2&amp;gt;Update the Hello World greeting&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;form class=&amp;quot;form-validate&amp;quot; action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php&#039;); ?&amp;gt;&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;updhelloworld&amp;quot; name=&amp;quot;updhelloworld&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&amp;gt;&lt;br /&gt;
        	&amp;lt;dl&amp;gt;&lt;br /&gt;
          	    &amp;lt;dt&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getLabel(&#039;id&#039;); ?&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
             	&amp;lt;dd&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getInput(&#039;id&#039;); ?&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
        	    &amp;lt;dt&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getLabel(&#039;greeting&#039;); ?&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
        	    &amp;lt;dd&amp;gt;&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;getInput(&#039;greeting&#039;); ?&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
            	&amp;lt;dd&amp;gt;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_helloworld&amp;quot; /&amp;gt;&lt;br /&gt;
            	    &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;updhelloworld.submit&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                &amp;lt;dd&amp;gt;&amp;lt;button type=&amp;quot;submit&amp;quot; class=&amp;quot;button&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;Submit&#039;); ?&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
			                &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/dd&amp;gt;&lt;br /&gt;
        	&amp;lt;/dl&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;clr&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This layout utilises the forms design which resides with the related model.  The getLabel and getInput will pickup the xml fields defined and display appropriately.  More on the xml file within the models section of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Create a file &#039;&#039;site/views/updhelloworld/tmpl/default.xml&#039;&#039; containing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/updhelloworld/tmpl/default.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/views/updhelloworld/tmpl/default.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables a menu option to be allocated to the frontend form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the model ==&lt;br /&gt;
The &#039;&#039;UpdHelloWorld&#039;&#039; model sets up the data through from the related form and allows the mechanism to save the subsequent data loaded into the form into the database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/updhelloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/models/updhelloworld.php&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
 &lt;br /&gt;
// Include dependancy of the main model form&lt;br /&gt;
jimport(&#039;joomla.application.component.modelform&#039;);&lt;br /&gt;
// import Joomla modelitem library&lt;br /&gt;
jimport(&#039;joomla.application.component.modelitem&#039;);&lt;br /&gt;
// Include dependancy of the dispatcher&lt;br /&gt;
jimport(&#039;joomla.event.dispatcher&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * UpdHelloWorld Model&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelUpdHelloWorld extends JModelForm&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var object item&lt;br /&gt;
	 */&lt;br /&gt;
	protected $item;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the data for a new qualification&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
&lt;br /&gt;
        $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
        // Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&#039;com_helloworld.updhelloworld&#039;, &#039;updhelloworld&#039;, array(&#039;control&#039; =&amp;gt; &#039;jform&#039;, &#039;load_data&#039; =&amp;gt; true));&lt;br /&gt;
		if (empty($form)) {&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
		return $form;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
	 * @return object The message to be displayed to the user&lt;br /&gt;
	 */&lt;br /&gt;
	function &amp;amp;getItem()&lt;br /&gt;
	{&lt;br /&gt;
&lt;br /&gt;
		if (!isset($this-&amp;gt;_item))&lt;br /&gt;
		{&lt;br /&gt;
			$cache = JFactory::getCache(&#039;com_helloworld&#039;, &#039;&#039;);&lt;br /&gt;
			$id = $this-&amp;gt;getState(&#039;helloworld.id&#039;);&lt;br /&gt;
			$this-&amp;gt;_item =  $cache-&amp;gt;get($id);&lt;br /&gt;
			if ($this-&amp;gt;_item === false) {&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		return $this-&amp;gt;_item;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public function updItem($data)&lt;br /&gt;
	{&lt;br /&gt;
        // set the variables from the passed data&lt;br /&gt;
        $id = $data[&#039;id&#039;];&lt;br /&gt;
        $greeting = $data[&#039;greeting&#039;];&lt;br /&gt;
&lt;br /&gt;
        // set the data into a query to update the record&lt;br /&gt;
		$db		= $this-&amp;gt;getDbo();&lt;br /&gt;
		$query	= $db-&amp;gt;getQuery(true);&lt;br /&gt;
        $query-&amp;gt;clear();&lt;br /&gt;
		$query-&amp;gt;update(&#039; #__helloworld &#039;);&lt;br /&gt;
		$query-&amp;gt;set(&#039; greeting = &#039;.$db-&amp;gt;Quote($greeting) );&lt;br /&gt;
		$query-&amp;gt;where(&#039; id = &#039; . (int) $id );&lt;br /&gt;
&lt;br /&gt;
		$db-&amp;gt;setQuery((string)$query);&lt;br /&gt;
&lt;br /&gt;
        if (!$db-&amp;gt;query()) {&lt;br /&gt;
            JError::raiseError(500, $db-&amp;gt;getErrorMsg());&lt;br /&gt;
        	return false;&lt;br /&gt;
        } else {&lt;br /&gt;
        	return true;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following file &#039;&#039;updhelloworld.xml&#039;&#039; should be created using your favourite editor and saved in the forms folder under the models directory.  The first of the fields being referenced id using the sql type so that I returns the results from the query into a dropdown list form to be selected.&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/updhelloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/models/forms/updhelloworld.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form name=&amp;quot;updhelloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset name=&amp;quot;updhelloworld&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
            name=&amp;quot;id&amp;quot;&lt;br /&gt;
            type=&amp;quot;sql&amp;quot;&lt;br /&gt;
            multiple=&amp;quot;false&amp;quot;&lt;br /&gt;
            size=&amp;quot;1&amp;quot;&lt;br /&gt;
            label=&amp;quot;COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_ID&amp;quot;&lt;br /&gt;
            description=&amp;quot;COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_ID&amp;quot;&lt;br /&gt;
            query=&amp;quot;select id, greeting from #__helloworld&amp;quot;&lt;br /&gt;
            key_field=&amp;quot;id&amp;quot;&lt;br /&gt;
            value_field=&amp;quot;greeting&amp;quot;&lt;br /&gt;
            default=&amp;quot;0&amp;quot;&lt;br /&gt;
			required=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_ID&amp;lt;/option&amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
            name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
            type=&amp;quot;text&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_GREETING&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_GREETING&amp;quot;&lt;br /&gt;
			required=&amp;quot;true&amp;quot;&lt;br /&gt;
			size=&amp;quot;50&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adding some language keys ==&lt;br /&gt;
&lt;br /&gt;
This file provides the text link between the label in the model form definition to be displayed in the view.  And being for the frontend, it resides in the site folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;site/language/en-GB/en-GB.com_helloworld.ini&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_ID=&amp;quot;Greeting ID&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_ID=&amp;quot;This is the ID of the Greeting record&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FORM_LBL_UPDHELLOWORLD_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FORM_DESC_UPDHELLOWORLD_GREETING=&amp;quot;Greeting description&amp;quot;&lt;br /&gt;
JOPTION_SELECT_ID=&amp;quot; -- Select Greeting to Update -- &amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the last 2 lines to the &#039;&#039;admin/language/en-GB/en-GB.com_helloworld.sys.ini&#039;&#039; file to provide the text link for the menu type display.  And being for the backend, it resides in the admin language folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;admin/language/en-GB/en-GB.com_helloworld.sys.ini&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_INSTALL_TEXT=&amp;quot;HelloWorld Install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld postlight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld postflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld postflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld postflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld preflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld preflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld preflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld preflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UNINSTALL_TEXT=&amp;quot;HelloWorld Uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDATE_TEXT=&amp;quot;HelloWorld Update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Update the Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDHELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;Update greeting here&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;_populateState&#039;&#039; method is, by default, automatically called when a state is read by the &#039;&#039;getState&#039;&#039; method.&lt;br /&gt;
&lt;br /&gt;
== Packaging the component ==&lt;br /&gt;
&lt;br /&gt;
Content of your code directory-&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_02#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/updhelloworld.php|site/updhelloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/controllers/updhelloworld.php|site/controllers/updhelloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/controllers/index.html|site/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/views/updhelloworld/view.html.php|site/views/updhelloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/views/updhelloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/views/updhelloworld/tmpl/default.xml|site/views/updhelloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/views/updhelloworld/tmpl/default.php|site/views/updhelloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/models/updhelloworld.php|site/models/updhelloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_18#site/models/forms/updhelloworld.xml|site/models/forms/updhelloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_12#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_09#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_head.php|admin/views/helloworlds/tmpl/default_head.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_body.php|admin/views/helloworlds/tmpl/default_body.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_07#admin/views/helloworlds/tmpl/default_foot.php|admin/views/helloworlds/tmpl/default_foot.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_14#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_13#admin/language/en-GB/en-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/language/en-GB/en-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_11#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_08#language/en-GB/en-GB.ini|language/en-GB/en-GB.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_01#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-16x16.png&#039;&#039;&lt;br /&gt;
* &#039;&#039;media/images/tux-48x48.png&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a compressed file of this directory or directly download the [http://joomlacode.org/gf/download/frsrelease/11394/58397/com_helloworld-1.6-part07.zip archive] and install it using the extension manager of Joomla!1.7. You can add a menu item of this component using the menu manager in the backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;helloworld.xml&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;1.7.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting conttraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;November 2009&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.18&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 1.7 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New in 1.7 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;updhelloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;language&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
	&amp;lt;!-- UPDATESERVER DEFINITION --&amp;gt;&lt;br /&gt;
	&amp;lt;updateservers&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note: No spaces or linebreaks allowed between the server tags --&amp;gt;&lt;br /&gt;
		&amp;lt;server type=&amp;quot;extension&amp;quot; priority=&amp;quot;1&amp;quot; name=&amp;quot;HelloWorld Update Site&amp;quot;&amp;gt;http://yourdomain.com/update/helloworld-update.xml&amp;lt;/server&amp;gt;&lt;br /&gt;
	&amp;lt;/updateservers&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can see in your component &#039;&#039;&#039;hello-world&#039;&#039;&#039; an array with two colums, two rows and checkboxes. You can click the checkboxes in order to select the different options you want.&lt;br /&gt;
&lt;br /&gt;
== Zips ==&lt;br /&gt;
Download the zip file for this Part:&lt;br /&gt;
[http://www.glennarkell.com/joomlaorg/com_helloworld_0.0.18.zip]&lt;br /&gt;
&lt;br /&gt;
== Navigate ==&lt;br /&gt;
&lt;br /&gt;
[[Developing a Model-View-Controller (MVC) Component for Joomla!1.7 - Part 17|Prev: Adding an update server]]&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
*[[User:garkell|Glenn Arkell]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[category:Joomla! 1.6]]&lt;br /&gt;
[[category:Joomla! 1.7]]&lt;br /&gt;
[[category:Manual]]&lt;/div&gt;</summary>
		<author><name>Lightinthedark</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Developing_a_MVC_Component/Example_of_a_frontend_update_function&amp;diff=64379</id>
		<title>Archived talk:Developing a MVC Component/Example of a frontend update function</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived_talk:Developing_a_MVC_Component/Example_of_a_frontend_update_function&amp;diff=64379"/>
		<updated>2012-01-24T09:36:06Z</updated>

		<summary type="html">&lt;p&gt;Lightinthedark: Created page with &amp;quot;This section of the tutorial seems to say that to add an &amp;quot;update&amp;quot; view to the helloworld component a new entry point file must be created with the same name as the view (&amp;quot;updhell...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section of the tutorial seems to say that to add an &amp;quot;update&amp;quot; view to the helloworld component a new entry point file must be created with the same name as the view (&amp;quot;updhelloworld.php&amp;quot; in that example). I think this is wrong because:&lt;br /&gt;
1) I can delete this file and the example component still works&lt;br /&gt;
2) None of the other components have this structure (eg com_users just&lt;br /&gt;
has a switch in the main controller&#039;s display to select different&lt;br /&gt;
displays based on view name)&lt;br /&gt;
3) A &amp;quot;die()&amp;quot; in that file never gets executed.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;quot;helloworld.php&amp;quot; (without the &amp;quot;upd&amp;quot; prefix) was created as the entry point back in part 2.&lt;br /&gt;
&lt;br /&gt;
:-Dave&lt;/div&gt;</summary>
		<author><name>Lightinthedark</name></author>
	</entry>
</feed>