cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya A. Kriveshko" <>
Subject Re: Q: Dynamically choosing action type.
Date Tue, 06 Aug 2002 18:45:10 GMT
Ilya A. Kriveshko wrote:

> I'm a bit confused as to how it is determined which action from the 
> set gets executed. It appears to somehow be related to 
> "cocoon-action-*" parameter, but I can't seem to find how the 
> selection scheme works. Can you point me to the .java file where the 
> selection happens?

Ok, I'm not confused anymore. I found the file:

It appears that "cocoon-action-" prefix is hard-coded in 
org/apache/cocoon/ It is used by HttpEnvironment in 
determining the environment's action, and that's what is matched against 
the names of the actions in the set.

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 

Is there already a way to do this that I overlooked?

Thank you!

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message