[Catalyst] Questions about chained actions, endpoints, etc.
Doran L. Barton
fozz at iodynamics.com
Wed Mar 21 21:34:54 GMT 2007
Hey guys, this very well may be due purely to my lack of experience in this
matter, but I'm having trouble getting chained actions working the way I
WANT them to work and I'm suspicious the way I want them to work is not the
way they're intended to work.
Here's the situation: I want the application to have public paths like
these:
/admin List of all existing "books" you can look at
/admin/add Form (FormBuilder) for adding a new book
/admin/99 Detailed output of data on book 99
/admin/99/edit Form (FormBuilder) for editing book 99 data
/admin/99/delete Form for confirming deletion of book 99
Looking at the Catalyst::DispatchType::Chained documentation, it's not
obvious (to me, anyway) how I should go about this.
The way I see it, /admin should be handled by a:
package Foo::Controller::Admin;
sub index : private {...}
and /admin/add should be handled by a:
sub add : Local Form {...}
So, how exactly would someone suggest I set up the chained handlers for the
other paths? I had something like this:
sub detail :PathPart('admin') Chained('/') Args(1) {...}
And that worked for the /admin/99 path, but nothing I can muster up seems
to match the /admin/99/{edit,delete} paths.
Any thoughts from those more experienced than me?
--
fozz at iodynamics.com is Doran L. Barton, president/CTO, Iodynamics LLC
Iodynamics: IT and Web services by Linux/Open Source specialists
"Dealers will hear car talk at noon"
-- Headline seen in newspaper
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070321/838bb6a1/attachment-0001.pgp
More information about the Catalyst
mailing list