I am newbie to joomla! component programming. i am creating a MVC component that users can reserve some dates.
my component should have a simple settings view that admin can manage the component.
i used some references but i have problem to create this settings
view and it doesn't work.
to do this, i created a #__mycomponent_settings table and a row that holds settings data and also added these files:
- com_mycomponent/controllers/settings.php
- com_mycomponent/models/settings.php
- com_mycomponent/models/forms/settings.xml
- com_mycomponent/tables/settings.php
- com_mycomponent/views/settings/view.html.php
- com_mycomponent/views/settings/tmpl/default.php
I defined my fields in the xml file and loaded them to the view correctly, but the real problem that confuses me is i really don't know how to use JForm and JTable correctly to submit and save data in the database or to retrieve previously saved data and put them into the fields. or how i should use JToolbarHelper to submit data or what must be entered in the action attribute of the form. i used save button of JToolbarHelper but it takes me to the
com_mycomponent&view=settings&layout=edit
but i didn't define any edit layout everywhere in me code!
i get so confused and will be appreciated if you help me.