Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users
Is it possible somehow to mix and match path parts using Chained?
 

Index | Next | Previous | View Flat


ddaupert at gmail

Jun 9, 2009, 10:55 AM


Views: 562
Permalink
Is it possible somehow to mix and match path parts using Chained?

I have a requirement to be able to do things like this:

A user creates "actionitems" which are just task notes.
An actionitem might not be associated with a project,
or a meeting, or assigned to another user, etc. Later,
it might be attached to a meeting; then all actionitems
associated with that meeting can be listed; individual items
can be updated, etc. Also, there might be several meetings
associated with a given project. We want to list those,
list the actionitems associated with particular projects,
etc.

I have a lot of this worked out using Chained, but there's a problem.
I've got controller classes like:

C::P::Actionitems
C::P::Meetings
C::P::Users::Profile::Actionitems
C::P::Users::Profile::Meetings
C::P::Users::Profile::Meetings::Actionitems
etc

It gets yukkie fast. I'm looking for a way to, -- as the
documentation says -- "redispatch a chain through any controller
or namespace you want," and I'd certainly like to stay DRY. I need to be
able to mix and match methods, so I can serve URLs like these:

/project/list # self explanatory
/meeting/list # self explanatory
/project/*/meeting/list # meetings associated to a project
/user/*/project/list # projects user is member of
/user/*/actionitem/create # unassociated item
/user/*/actionitem/*/edit # unassociated item
/user/*/meeting/*/actionitem/list # items associated to a meeting
/user/*/meeting/*/actionitem/*/edit # edit a particular meeting's item
/user/*/project/*/meeting/*/actionitem/*/edit # yada yada

In this scenario, actions may be endpoints in some situations, links in
others.
To put it another way, is there a way to have actions like these, and use
Chained to dispatch around?

C::P::Users
C::P::Actionitems
C::P::Meetings
C::P::Projects

Is this even possible to do using Chained? If not, what would be
recommended?


/dennis

Subject User Time
Is it possible somehow to mix and match path parts using Chained? ddaupert at gmail Jun 9, 2009, 10:55 AM
    Re: Is it possible somehow to mix and match path parts using Chained? devin.austin at gmail Jun 9, 2009, 11:00 AM
    Re: Is it possible somehow to mix and match path parts using Chained? ddaupert at gmail Jun 9, 2009, 2:51 PM
    Re: Is it possible somehow to mix and match path parts using Chained? peter at peknet Jun 9, 2009, 3:14 PM
        Re: Is it possible somehow to mix and match path parts using Chained? ddaupert at gmail Jun 9, 2009, 7:46 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.