Jforms
Posted: Sun Apr 01, 2012 8:10 am
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_Mod ... _-_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
Where it seems to struggle is this line
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
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
I am developing my first component in 2.5. I have adapted the code from the excellent tutorial http://docs.joomla.org/Developing_a_Mod ... _-_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: Select all
// 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');
Code: Select all
$form = $this->get('Form','awarded');
When it gets to this line 473 in view.php
Code: Select all
if (isset($this->_models[$model]))
Firstly am I using the get(From) call correct?
What else do I need to do to get the model recognised?
Regards