You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Pietschmann <de...@gmail.com> on 2005/07/22 14:18:41 UTC
resource vs. action-set
Hi there,
today's question: So far I have a resource containing some actions which is
called at the beginning of one matcher. Those actions process information
from the request. This works fine, but I recently ran into action-sets and
thought "oh well, it's a resource which only contains actions, so it should
be an action-set, right?". So basically I replaced the resource with an
action-set and it doesn't work anymore.
<map:action-sets>
<map:action-set name="generateModel">
<map:act type="auth-protect">
<map:parameter name="handler"
value="portalhandler"/>
<map:act type="updateModel">.</map:act>
<map:act type="trainCDL4">.</map:act>
<map:act type="writeModel">.</map:act>
</map:act>
</map:action-set>
</map:action-sets>
<map:resources>
<map:resource name="generateModel">
<map:act type="auth-protect">
<map:parameter name="handler"
value="portalhandler"/>
<map:act type="updateModel">..</map:act>
<map:act type="trainCDL4">.</map:act>
<map:act type="writeModel">.</map:act>
</map:act>
</map:resource>
</map:resources>
</snip>
<map:match pattern="*/**.ama">
<!- this one works: -->
<!- <map:call resource="generateModel"/>-->
<!- this one doesn't -->
<map:act set="generateModel"/>
..
</map:match>
(I left out the parameters for the actions.)
Why doesn't the first one work?
Do I misunderstand the concept of action-sets? Or is there a difference in
obtaining the request object or a problem with the authentication?
Thanx,
Stefan