The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Jforms
PostPosted: Sun Apr 01, 2012 8:10 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 08, 2007 6:44 am
Posts: 24
Hi
I am developing my first component in 2.5. I have adapted the code from the excellent tutorial http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!2.5_-_Part_01

The view I am trying to design has two panels the left hand panel will display normal names addresses etc, the right panel will display records linked specifically to the name (or id) on the left hand panel. I have got the Left hand panel working ok using Jforms. I am struggling to get the right hand panel to work

This is the code I am using

Code:
 // this will load code for the left hand panel
$form = $this->get('Form');               
      $item = $this->get('Item');
      $script = $this->get('Script');
               // This section will load data for the right hand panel
                $form = $this->get('Form','awarded');   // The second paramter should overide the  default         
      $item = $this->get('Item',awarded);
      $script = $this->get('Script');


Where it seems to struggle is this line
Code:
$form = $this->get('Form','awarded');


Looking at the source code in view.php I would have thought if I passed another model as the second parameter (awarded) it would then execute the code within that model similar would happen for

When it gets to this line 473 in view.php

Code:
if (isset($this->_models[$model]))

It does not recognise the model and just returns a string of 'award' I have checked the model and it does exist

Firstly am I using the get(From) call correct?

What else do I need to do to get the model recognised?

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group