Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 21117 invoked by uid 500); 7 Aug 2002 07:31:21 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 21095 invoked from network); 7 Aug 2002 07:31:21 -0000 Date: Wed, 7 Aug 2002 09:30:02 +0200 From: Christian Haul To: cocoon-users@xml.apache.org Subject: Re: Q: Dynamically choosing action type. Message-ID: <20020807093002.M23315@bremen.dvs1.informatik.tu-darmstadt.de> Reply-To: haul@dvs1.informatik.tu-darmstadt.de References: <3D4FF9BF.50701@kaon.com> <20020806201416.L23315@bremen.dvs1.informatik.tu-darmstadt.de> <3D501677.9020206@kaon.com> <3D501936.8050104@kaon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D501936.8050104@kaon.com> User-Agent: Mutt/1.3.22.1i Organization: Databases and Distributed Systems Group, Darmstadt University of Technology X-MailScanner: Found to be clean X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On 06.Aug.2002 -- 02:45 PM, Ilya A. Kriveshko wrote: > Ilya A. Kriveshko wrote: > My previous question still stands: > > >Can I write a custom dispatcher class that would look at the request > >and then decide which action from the set should get executed, and > >install that dispatcher for a particular action-set in the sitemap? > > I wish there were a way to call setAction() on Environment or some other > alternative way to specify the action, other than having a > pre-determined request parameter. Maybe even dynamically inside another > action, so that one can have several tiers of action sets, one executed > after another and the former determining the action to execute in the > latter. > > Is there already a way to do this that I overlooked? I believe that with compiled sitemap as well as treeprocessor you can't do it through the sitemap. However, you could write an action that dispatches other actions. Afterall, actions are just avalon components and they share the same component manager to some extent. Your action would need to be composable to get the component manager instance needed. But watchout: This custom action needs to be declared in the very sitemap you want to use it, since this way it would inherit all components from managers of ancestor sitemaps. Obviously, as long as you don't access components declared on subsitemaps this could be relaxed to declare the action on the same level or below the one your other actions are declared. If you were using the flow layer in 2.1-dev, you could do it from there. Chris. -- C h r i s t i a n H a u l haul@informatik.tu-darmstadt.de fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: