cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: Actions and Modular Databases Actions
Date Wed, 21 May 2003 07:39:18 GMT
On 20.May.2003 -- 07:31 PM, Antonio Gallardo wrote:
> Hi:
> I have the following scenario:
> I need to generate some data based on a request from the user. The problem
> is that this data will use more than 1 table. Then we need to use Database
> transactions. We also know that Modular Database Actions are
> transactional. They can do the work.
> After thinking about the solution of this problem, we tought that in order
> to prepare the data before the use of "DatabaseAddAction". We need to
> build an Action. Here is a scratch of the sitemap:
> 1- <map:match pattern="resultpage">
> 2-  <map:action type="preparedata">
> 3-    <map:action type="mod-db-add">
> 4-      <map:parameter name="table-set" value="my_table_set"/>
> 5-       <map:generate ......>
> 6-    </map:action>
> 7-    <!-- error cannot insert into database -->
> 8-  </map:action>
> 9-  <!-- error, cannot prepare data -->
> 10 </map:match>
> The question is:
> If we will store the data into line 2, the action will return new data
> into a "map" (As normal). But I dont know how to tell that the parameters
> will come from returned map and not from the traditional:

Indeed, there is currently no way for an input module to get at the
sitemap variables. I fear it's not easily hackable because
aggregations and includes share the same request IIRC.

So you need to store your data that is accessible from a
module. Request attributes come to mind for this.

Another idea could be to prepare the data in a module. Of course this
depends on the complexity of the preparation and the dependencies
among the values.

C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message