create component
===

I am doing my first component for backend in Joomla 2.5.
The fisrt part is ok, I create a a component with general contoller and now I show all the elements in a table 

I followed this [tutorial][1] for this

but now I want to add actions like edit, new and delete

I follow now this [tutorial][2] but when I click in edit, for example. I go to a white page

my name component is Busqueda and my table is restaurantes.

This is the model for edit action models/restaurante.php

    class BusquedaModelRestaurante extends JModelAdmin{
    
    	public function getTable($type= 'Restaurantes', $prefix='RestaurantesTable', $config=array()){
    			return JTable::getInstance($type, $prefix, $config);
    	}
    	
    	public function getForm($data = array(), $loadData = true){
    		$form = $this->loadForm('com_busqueda.restaurante', 'restaurante', array('control' => 'jform', 'load_data' => $loadData));
    		if (empty($form)) {
    			return false;
    		}
    		return $form;
    	}
    	
    	protected function loadFormData(){
    		$data= JFactory::getApplication()->getUserState('com_busqueda.edit.restaurante.data', array());
    		if(empty($data)){
    			$data=$this->getItem();
    		}
    		return $data;
    	}
    }

this is my models/forms/form.xml

    <?xml version="1.0" encoding="utf-8"?>
    <form>
    	<fieldset>
    		<field
    			name="id"
    			type="hidden"
    		/>
    		<field name="nombre" type="text" class="inputbox"
    			size="40" label="nombre"
    			description="Nombre" />
    
    		<field name="direccion" type="text" class="inputbox"
    			size="40" label="direccion"
    			description="Direccion" />
    			
    		...
    
    	</fieldset>
    </form>


In controllers/ I have restaurantes.php and restaurante.php. The last one don´t have any function.

finally in views/restaurante I have view.html and views/restaurante/tmpl/edit.php

the view is

    class BusquedaViewRestaurante extends JView
    {
    	public function display($tpl = null)
    	{
    		$form = $this->get('Form');
    		$item = $this->get('Item');
    
    		// Check for errors.
    		if (count($errors = $this->get('Errors'))) {
    			JError::raiseError(500, implode("\n", $errors));
    			return false;
    		}
    
    		$this->form =$form;
    		$this->item =$item;
    		
    		$this->addToolbar();
    		parent::display($tpl);
    	}
    
    	/**
    	 * Add the page title and toolbar.
    	 *
    	 * @since	1.6
    	 */
    	protected function addToolbar()
    	{
    		$input =JFactory::getApplication()->input;
    		$input->set('hidemainmenu', true);
    		$isNew = ($this->item->id == 0);
    		JToolBarHelper::title($isNew ? JText::_('NEW')
    									 : JText::_('EDIT'));
    		JToolBarHelper::save('busqueda.save');
    		JToolBarHelper::cancel('busqueda.cancel', $isNew ? 'JTOOLBAR_CANCEL'
    														 : 'JTOOLBAR_CLOSE');				
    	}
    }

in edit.php

    <form action="<?php echo JRoute::_('index.php?option=com_busqueda&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="restaurante-form" class="form-validate">
    	<fieldset class="adminform">
    		<legend><?php echo JText::_('DETALLES'); ?></legend>
    		<ul class="adminformlist">
    			<li><?php echo $this->form->getLabel('nombre'); ?>
    			<?php echo $this->form->getInput('nombre'); ?></li>
    			
    			<li><?php echo $this->form->getLabel('direccion'); ?>
    			<?php echo $this->form->getInput('direccion'); ?></li>
    			
    ....
    			
    
    		</ul>
    	</fieldset>
    	<div>
    		<input type="hidden" name="task" value="" />
    		<?php echo JHtml::_('form.token'); ?>
    	</div>	
    	
    </form>

this is the same that appears in the tutorial, but when I click in edit I see a white page.

Any idea. I'm forgetting to do something.

Thanks.

  [1]: http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!2.5_-_Part_07
  [2]: http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!2.5_-_Part_09

