cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <o...@vip.net.pl>
Subject Nested actions in action-sets
Date Sun, 06 Apr 2003 17:51:10 GMT
Has anyone tried lately to use action set with nested action? This is a piece
of code I use: 
<map:action-sets>
    <map:action-set name="process-route">
        <map:act type="form-validator" action="show-route"/>
        <map:act type="form-validator" action="route-change">
	        <map:act type="serverpages" src="action/route-change.xsp"/>
        </map:act>
        <map:act type="form-validator" action="route-add-contractor">
            <map:act type="serverpages" src="action/route-add-contractor.xsp"/>
        </map:act>
        <map:act type="form-validator" action="route-close">
            <map:act type="serverpages" src="action/route-close.xsp"/>
        </map:act>
    </map:action-set>
</map:action-sets>

<!-- later on -->
<map:match pattern="content/*">
    <map:select type="request-parameter">
        <map:parameter name="parameter-name" value="visited"/>
        <map:when test="1">
            <map:act set="process-route">
                <map:parameter name="descriptor" value="data/{1}-form-descriptor.xml"/>
                <map:parameter name="validate-set" value="main"/>
                <map:aggregate element="content">
                    <map:part src="cocoon:/form/{../1}"/>
                    <map:part src="cocoon:/data/{../1}"/>
                </map:aggregate>
                <map:serialize/>
            </map:act>
        </map:when>
    </map:select>
    <map:aggregate element="content">
        <map:part src="cocoon:/form/{1}"/>
    </map:aggregate>
    <map:serialize/>
</map:match>

The problem is that when request is being made the user receives the page that
denotes that the particular action from action set is being executed and
action succeeds but little investigation shows that nested action does not get
executed ( for example action/route-add-contractor.xsp )
When I prepare the action set like this:

<map:action-sets>
    <map:action-set name="process-route">
        <map:act type="form-validator" action="show-route"/>
        <map:act type="serverpages" src="action/route-change.xsp" action="route-change"/>
        <map:act type="serverpages" src="action/route-add-contractor.xsp" action="route-add-contractor"/>
        <map:act type="serverpages" src="action/route-close.xsp" action="route-close"/>
    </map:action-set>
</map:action-sets>

all actions execute properly so this must be the case with nesting actions in
action sets.

Best regards
	LG
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Mime
View raw message