<br><br><div class="gmail_quote">On Tue, Jun 9, 2009 at 11:55 AM, Dennis Daupert <span dir="ltr">&lt;<a href="mailto:ddaupert@gmail.com">ddaupert@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a requirement to be able to do things like this:<br><br>A user creates &quot;actionitems&quot; which are just task notes.<br>An actionitem might not be associated with a project,<br>or a meeting, or assigned to another user, etc. Later,<br>

it might be attached to a meeting; then all actionitems<br>associated with that meeting can be listed; individual items<br>can be updated, etc. Also, there might be several meetings <br>associated with a given project. We want to list those,<br>

list the actionitems associated with particular projects,<br>etc.<br><br>I have a lot of this worked out using Chained, but there&#39;s a problem. <br>I&#39;ve got controller classes like:<br><br>C::P::Actionitems<br>C::P::Meetings<br>

C::P::Users::Profile::Actionitems<br>C::P::Users::Profile::Meetings<br>C::P::Users::Profile::Meetings::Actionitems<br>etc<br><br>It gets  yukkie fast. I&#39;m looking for a way to, -- as the<br>documentation says -- &quot;redispatch a chain through any controller <br>

or namespace you want,&quot; and I&#39;d certainly like to stay DRY. I need to be able to mix and match methods, so I can serve URLs like these:<br><br>/project/list                       # self explanatory<br>/meeting/list                       # self explanatory<br>

/project/*/meeting/list             # meetings associated to a project<br>/user/*/project/list                # projects user is member of<br>/user/*/actionitem/create           # unassociated item<br>/user/*/actionitem/*/edit           # unassociated item<br>

/user/*/meeting/*/actionitem/list   # items associated to a meeting<br>/user/*/meeting/*/actionitem/*/edit # edit a particular meeting&#39;s item <br>/user/*/project/*/meeting/*/actionitem/*/edit # yada yada<br><br>In this scenario, actions may be endpoints in some situations, links in others. <br>

To put it another way, is there a way to have actions like these, and use<br>Chained to dispatch around?<br><br>C::P::Users<br>C::P::Actionitems<br>C::P::Meetings<br>C::P::Projects<br><br>Is this even possible to do using Chained? If not, what would be recommended?<br>
<font color="#888888">
<br><br>/dennis<br>
</font><br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div>Are you creating plugins for each of those user actions? C::P:: is the plugin naming convention.  I could have missed something though.<br><br>Anyway, check out this Chained tutorial I&#39;ve written, it covers the type of chaining you want to do.  Not quite as in depth as your example, but there is a &quot;nested&quot; chain, so I&#39;m sure you could figure it out from there.  If not, you have the list :-)<br>
<br><a href="http://www.catalyzed.org/2009/05/chained-the-awesomesauce.html">http://www.catalyzed.org/2009/05/chained-the-awesomesauce.html</a><br><br>hth,<br><br>-dhoss<br clear="all"><br>-- <br>Devin Austin<br><a href="http://www.codedright.net">http://www.codedright.net</a><br>
<a href="http://www.dreamhost.com/r.cgi?326568/hosting.html">http://www.dreamhost.com/r.cgi?326568/hosting.html</a> - Host with DreamHost!<br>