cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrzej Jan Taramina" <andr...@chaeron.com>
Subject Revised ResourceLoadAction posted...
Date Wed, 12 Nov 2003 20:08:59 GMT
I've updated my ResourceLoadAction so that it optionally will save the 
resource stream data (as a string) in your session/request with a given 
attribute name.  

The optional write-to and attribute-name parameters, if specified, will cause 
the ResourceLoadAction do the save.  write-to can be either session or 
request (session is default). Your choice of attribute name.  

So an invocation in your pipeline would look something like this:

<map:act type="resource-load" src="cocoon:/my.pipeline>
	<map:parameter name="write-to" value="request"/>
	<map:parameter name="attribute-name" value="my.output"/>
   	...
<map:act>

This becomes very useful if you have a pipeline that produces a document that 
you then want to save into a database column using a Modular Database Action.

By allowing you to store the resource stream as a string in your 
session/request, you can get access to it from a Database Action (using Input 
Modules).  I use this to save XML documents, created by a pipeline, into a 
database.   

Source can be found in bugzilla, at:

	http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24389

Enjoy!

....Andrzej

PS.  Sylvain....don't say I don't contribute back to Cocoon!  <grins>


Mime
View raw message