cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Larsson" <max.lars...@gmservice.de>
Subject RE: question about failed actions
Date Tue, 22 Jan 2002 06:51:34 GMT
Hi,

what you want to do wokrs in this way.


<map:match ...>
	<map:act ...>
		...on success
		<map:serialze/>
	</map:act>
	... the following is only executed on failure
	<map:generate/>
	<map:serialze/>
</map:match>


An action fails if it returns null in his act method.
And i think it is important to have a serilizer or
reader within the action else it wouldn't stop. It would
than continue after the action.

HTH

Max

> -----Original Message-----
> From: Bryan Murphy [mailto:bryan@terralab.com]
> Sent: Montag, 21. Januar 2002 21:59
> To: cocoon-users@xml.apache.org
> Subject: question about failed actions
> 
> 
> Let's use this as an example of a possible action:
> 
> <map:act name="session-validate">
>   .. do something ..
> </map:act>
> 
> Now, what do you do if you want to action fails, yet you 
> still want to 
> modify the pipeline based on that failed action?  Well, of 
> course, you 
> could always write the action as a selector.  But what if you want to 
> reuse some code already written as an action?  You could of 
> course write 
> a wrapper selector, but I don't see why that should be 
> necessary.  Why 
> not something along these lines::
> 
> <map:act name="session-validate">
>   <map:act-successful>
>      .. do something ..
>   </map:act-success>
>   <map:act-failure>
>     .. do something else ..
>   </map:act-failure>
> </map:act>
> 
> Is there a good reason for not doing things this way that I 
> am missing 
> (or maybe a way of doing this that I have yet to discover)?  I would 
> assume you could do something similar for action sets.
> 
> Thanks!
> Bryan
> 
> 
> 
> ---------------------------------------------------------------------
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message