[Midas] default controller action problem

Michael Grauer michael.grauer at kitware.com
Wed Jul 11 12:09:54 EDT 2012


Hi Mona,

try this:

https://<midas_server_root>/annio2/index/get



If you want the index action for the index controller in a module, then the
correct path will get resolved automatically from a URL like this:

https://<midas_server_root>/annio2/

to the IndexController's indexAction function, but if you want a particular
action of the IndexController that isn't the indexAction, you'll need to
add the controller name and action in your URL, hence

https://<midas_server_root>/annio2/index/get

gets resolved to the IndexController's getAction function.


-Mike

On Sun, Jul 8, 2012 at 5:35 PM, Mona Wong <mona at sdsc.edu> wrote:

>
> I have the following code in
> modules/annio2/controllers/IndexController.php (note, annio2 is not a typo,
> I had to make this change due to a URL clash):
>
> <?php
> class Annio2_IndexController extends Annio2_AppController
> {
>     public $_models = array ( "Item", "Folder" );
>
>     /**
>      * @method initAction()
>      *  Index Action (first action when we access the application)
>      */
>     function init()
>     {
>
>     } // end method indexAction
>
>
>     function getAction()
>     {
>         $this->disableLayout();
>         $this->disableView();
>         echo "annio2 getAction!";
>     }
>
> and I browsed to the URL: https://<midas_server_root>/annio2/get but got:
>
> The system has encountered the following error:<br/><h3><br/>In , line:
> <br/>At 17:34:39 2012-07-08</h3><br/>Please notify your administrator with
> this information.<br/>
>
> What am I doing wrong?
>
> thanks,
> Mona
>
>
> *********************************************
>     Mona Wong
>     Web & iPad Application Developer
>     San Diego Supercomputer Center
>
>     You are the light you wish to see.
> *********************************************
>
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>
>


-- 
Thanks,
Michael Grauer
R & D Engineer
Kitware, Inc.
919 969 6990 x322
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120711/9d905436/attachment.html>


More information about the Midas mailing list