[cgiapp] CGI::Application::Dispatch [post] runmode not working
P Kishor
punk.kish at gmail.com
Mon Jan 19 09:07:53 EST 2009
I have a relatively standard application that works for all runmodes
except for save[post] (see below)
CGI::Application::Dispatch->dispatch(
prefix => '',
default => '',
debug => 1,
table => [
'' => { app => $App, rm => 'view' },
'find' => { app => $App, rm => 'find', },
'view/:p?/:o?/:s?' => { app => $App, rm => 'view', },
'edit/:p/:o?' => { app => $App, rm => 'edit', },
'other_pages/:p/:o?' => { app => $App, rm => 'other_pages', },
'create/:p/:o?' => { app => $App, rm => 'create', },
'save[post]' => { app => $App, rm => 'save', },
'/:p?/:o?/:s?' => { app => $App, rm => 'view' },
],
args_to_new => {
..
},
},
);
A little more detail -- the 'view' runmode is invoked if the URL is
http://[stuff]/Something
http://[stuff]/view/Something
The 'create' runmode is invoked if either 'Something' doesn't already
exist or if the URL is
http://[stuff]/create/Something
The 'create' runmode presents a form with 'method="post"' and
'action="index.cgi"' and a [submit] button named 'rm' with
'value="save"' but the debug switch in the C:A:D table sends messages
to the log that show that the 'save' rule is never matched. It is the
'create' rule that ends up getting matched even though the firebug
extension in Firefox shows that the http params 'post'ed are rm='save'
and the various fields in the form with their contents.
Any suggestions/guidance will be much appreciated.
--
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
More information about the cgiapp
mailing list