Jtoolbar MVC function - Joomla! Forum - community, help and support
hello all,
i have been attempting follow joomla 2.5 component development tutorial code joomla 3.0. have made way step 9/version 0.0.9
"developing model-view-controller component/2.5/adding backend actions"
the issue run tutorial shows how create 1 backend action utilizes form display data altered edit button triggers new form make further adjustments before sending original view.
this way more complex intend on making application.
what accomplish - have 1 view "config/view.html.php & config/tmpl/default.php" has controller "config.php"
in view.html.php setup toolbar button
to knowledge working correctly, because when click it triggers controller "config.php" have save button dumps "$_post" screen
-------------------my intent -------------------------
i $_post being sent controller stored in simple database table , message appear on screen stating information has been saved.
-----------------what know------------------------
i know how create $db function take input , insert db table.
i know how display message screen
-----------------what need know -----------------
i need know how have controller pass data proper model class make save button work
and need know how display same screen once information has been saved $db.
---------------just in case--------------------
the form
-----------------------------------------------------------------
i have been trying figure out weeks, have been unable find documentation joomla 1.5 1.6 1.7 2.5 or 3.0 shows how simple.
i have looked through many core components, of them use jmodeladmin send data form instead of dealing data , display same view.
i have been attempting follow joomla 2.5 component development tutorial code joomla 3.0. have made way step 9/version 0.0.9
"developing model-view-controller component/2.5/adding backend actions"
the issue run tutorial shows how create 1 backend action utilizes form display data altered edit button triggers new form make further adjustments before sending original view.
this way more complex intend on making application.
what accomplish - have 1 view "config/view.html.php & config/tmpl/default.php" has controller "config.php"
in view.html.php setup toolbar button
code: select all
jtoolbarhelper::apply('config.save');
to knowledge working correctly, because when click it triggers controller "config.php" have save button dumps "$_post" screen
code: select all
public function save()
{
var_dump($_post);
}
-------------------my intent -------------------------
i $_post being sent controller stored in simple database table , message appear on screen stating information has been saved.
-----------------what know------------------------
i know how create $db function take input , insert db table.
i know how display message screen
-----------------what need know -----------------
i need know how have controller pass data proper model class make save button work
and need know how display same screen once information has been saved $db.
---------------just in case--------------------
the form
code: select all
<form action="<?php echo jroute::_('index.php?option=com_mycomp&view=config'); ?>" method="post" name="adminform" id="adminform">
<input id="appkey" name="appkey"></input>
<div>
<input type="hidden" name="task" value="" />
<?php echo jhtml::_('form.token'); ?>
</div>
</form>
-----------------------------------------------------------------
i have been trying figure out weeks, have been unable find documentation joomla 1.5 1.6 1.7 2.5 or 3.0 shows how simple.
i have looked through many core components, of them use jmodeladmin send data form instead of dealing data , display same view.
i figured out missing step. after send data model in case jmodelitem store data in db use $_request determine page button clicked on allow me use following code direct oringal page instead of "editing view"
code: select all
$link = 'index.php?option=com_mycomp&view=config';
$this->setredirect($link, $msg);
Comments
Post a Comment