Page 1 of 1

Going Crazy!!!! :S

Posted: Sun Sep 09, 2007 9:21 am
by sylvesterfaro
Ok. I am a newbie... but I did read the documentation. (sorry about the poor english - I'm portuguese)

Here it goes...

I'm programming a simple component that allows to an administrator do make simple updates on a database. It's a simple form with a list of records with a check box to turn on or off and press a Submit button.

The thing is that everytime I submit the form (either by pressing the submit button or changing the number of visible records) I'm redirected to the Control Panel :(

The Component name is redesocialcascais

At toolbar.redesocialcascais.html I have:

class redesocialcascaisToolbar {
    /**
     * Displays toolbar
     */
    function projectos(){
        mosMenuBar::startTable();
        mosMenuBar::apply('projectoaplicar');
        mosMenuBar::spacer();
        mosMenuBar::back();
        mosMenuBar::spacer();
        mosMenuBar::help( 'ajuda.html', true );
        mosMenuBar::endTable();
    }

}



And at admin.redesocialcascais.php I have:

switch ($task) {
     case 'projectos':
          HTML_projectos::listar();
          break;

     case 'projectoaplicar':
          aplicar();
          break;

    default:
           break;
}



Maybe this can give a hint on wath is going on...

At my component form I have the following path showned:
Rede Social de Cascais / com_redesocialcascais / projectos

After I press the Submit button, I go back to the Control Panel and the path shown is:
Rede Social de Cascais / com_admin / projectoaplicar

It seems Joomla is forwarding the task projectoaplicar to the admin component instead of my own component?

What am I doing wrong?  :'(
This is on Joomla 10.0.13

Re: Going Crazy!!!! :S

Posted: Mon Sep 10, 2007 12:38 pm
by jlleblanc
If you have 'option' has a hidden variable in your form and set it to 'com_redesocialcascais', it should work. Like this:

Code: Select all

<input type="hidden" name="option" value="com_redesocialcascais" />

Re: Going Crazy!!!! :S

Posted: Tue Sep 11, 2007 12:45 am
by matthewhayashida
MOD NOTE: Moving to Joombie Q/A

Re: Going Crazy!!!! :S

Posted: Tue Sep 11, 2007 7:40 am
by sylvesterfaro
jlleblanc wrote:If you have 'option' has a hidden variable in your form and set it to 'com_redesocialcascais', it should work. Like this:

Code: Select all

<input type="hidden" name="option" value="com_redesocialcascais" />



AAaaaAAAaaaaAAAaAAaaaaHH!!  :D

Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks!

By the way... where can I get more complete documentation on Joomla 10.0.13??? It seems to be hard to find.  :(

Re: Going Crazy!!!! :S

Posted: Tue Sep 11, 2007 12:50 pm
by jlleblanc
Most of the documentation effort is now going into 1.5. The 1.0.x documentation was never really complete.