J1.5 talk

Difference between revisions of "Using the editor in a component"

From Joomla! Documentation

(New page: I used a test site and implemented the editor in the frontend. The edit and display functions worked fine however the Save and Cancel do not execute anything. The Save and Cancel buttons...)
 
Line 1: Line 1:
 
I used a test site and implemented the editor in the frontend.  The edit and display functions worked fine however the Save and Cancel do not execute anything.  The Save and Cancel buttons that have been added to the form call a javascript function submitbutton.  The submitbutton is executed however the documentation states that the editor's save method will trigger the save function in the controller which in turn calls the model's store method.  This is not actually true.  I am new to Joomla development so I thought maybe I typed it in wrong so I downloaded the completed example and it does not work either.  The editor's save method does not trigger the controller which I believe is necessary.  SO I think in order to make it work you need to trigger the controller directly from the button and bypass the javascript -submitbutton. I haven't tried it yet so if there any other suggestions.  That would be great.
 
I used a test site and implemented the editor in the frontend.  The edit and display functions worked fine however the Save and Cancel do not execute anything.  The Save and Cancel buttons that have been added to the form call a javascript function submitbutton.  The submitbutton is executed however the documentation states that the editor's save method will trigger the save function in the controller which in turn calls the model's store method.  This is not actually true.  I am new to Joomla development so I thought maybe I typed it in wrong so I downloaded the completed example and it does not work either.  The editor's save method does not trigger the controller which I believe is necessary.  SO I think in order to make it work you need to trigger the controller directly from the button and bypass the javascript -submitbutton. I haven't tried it yet so if there any other suggestions.  That would be great.
 +
 +
== The tutorial is not complete ==
 +
 +
Well what is happening is the following. The person who wrote the tutorial format one thing.
 +
 +
In order to use the proposed javascripts the library file /includes/js/joomla.javascript.js had to be included. This is standard in de Joomla backend but not in many frontend templates.
 +
 +
You have to manually add the following. This can for example be done view.html.php
 +
$document =& JFactory::getDocument();
 +
$document->addScript('includes/js/joomla.javascript.js');

Revision as of 07:34, 13 April 2009

I used a test site and implemented the editor in the frontend. The edit and display functions worked fine however the Save and Cancel do not execute anything. The Save and Cancel buttons that have been added to the form call a javascript function submitbutton. The submitbutton is executed however the documentation states that the editor's save method will trigger the save function in the controller which in turn calls the model's store method. This is not actually true. I am new to Joomla development so I thought maybe I typed it in wrong so I downloaded the completed example and it does not work either. The editor's save method does not trigger the controller which I believe is necessary. SO I think in order to make it work you need to trigger the controller directly from the button and bypass the javascript -submitbutton. I haven't tried it yet so if there any other suggestions. That would be great.

The tutorial is not complete[edit]

Well what is happening is the following. The person who wrote the tutorial format one thing.

In order to use the proposed javascripts the library file /includes/js/joomla.javascript.js had to be included. This is standard in de Joomla backend but not in many frontend templates.

You have to manually add the following. This can for example be done view.html.php $document =& JFactory::getDocument(); $document->addScript('includes/js/joomla.javascript.js');