You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Roman Kunert <ku...@yobe.de> on 2001/08/17 05:29:51 UTC
Problem with cascading actions and parameters...
ok, my matcher looks like this:
<map:match pattern="forms/*">
<!-- first validate whether user has logged in -->
<map:act type="session-validator">
<map:parameter name="descriptor"
value="context://protected/data/formdefinition/formdefinition.xml"/>
<map:parameter name="validate" value="username"/>
<!-- user has logged in, try to validate some forms -->
<map:act type="form-validator">
<map:parameter name="descriptor"
value="context://protected/data/formdefinition/formdefinition.xml"/>
<!-- this statement seems to work, the value in {1} is
correctly evaluated -->
<map:parameter name="constraint-set" value="{1}"/>
<!-- if validation succeeds we call the same form -->
<!-- here the value of {1} seems to be lost somewhere ????? -->
<map:redirect-to resource="form_page" target="{1}"/>
</map:act>
<!-- if validation failed we call the same form again -->
<map:redirect-to resource="form_page" target="{1}"/>
</map:act>
<!-- something was wrong, redirect to login page -->
<map:redirect-to uri="login"/>
</map:match>
when our resource gets called from within that action the value of the
parameter 'target' is null, meaning that the {1} doesn't get evaluated...
any clue?
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Problem with cascading actions and parameters...
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
Roman,
please RTFM, it's all explained in there. Solution is
[significant enclosing structures omitted!]
<map:parameter name="constraint-set" value="{1}"/>
<!--
Actually, this is *before* evaluating the action since
it is an extra parameter to it. Hence no new map has
been pushed. Current map is result from matcher.
-->
<map:redirect-to resource="form_page" target="{../1}"/>
<!--
This, however, is *after* evaluating the action. Thus
a new map has been pushed onto the others. Since we
want to refer to the next to current map, we need to
refer to {../1} here. Current map is result from action.
-->
[significant enclosing structures omitted!]
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. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>