Qson
unread,Jul 30, 2012, 8:17:31 AM7/30/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-de...@googlegroups.com
Hi,
I have a component which manages a lot of projects. I have a list view (projects) and an item view (project). The item view uses a form (project.xml) combined with JControllerForm and JModelAdmin. This works excellent, but now I have another form and another layout for a project budget. I want to use the same model and view (different layout) since much of the data is the same. How do I best control which form is used? A "form" url parameter which is used in JModelAdmin::getForm to select which form is loaded? Or perhaps one getForm and one getBudgetForm in the model and override the JControllerForm::save to use the custom methods of the model?
Perhaps it will be best after all to use separate models/views for each form, project, project_budget, project_members, project_results, but there will be lots of views and lots of duplicated code, since all use data from the default project view.
Thanks in advance!
// Qson