You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2003/10/13 10:05:37 UTC

modular database actions and passing params from sitemap

Hi,

I didn't find info on the subject, to how to pass information to
AddAction from sitemap.

I have created resource, which I call with certain parameters. These
parameters I would like to add to database.. little like this:

<map:resource name="foo">
 <map:act type="mod-db-add">
  <map:parameter name="table-set" ... />
 </map:act>
</map:resource>

<map:match ...>
 <map:call resource="foo">
  <map:parameter name="bar" value="{1}" />
  <map:parameter name="foo" value="session-attr:fiu" />
  ...
 </map:call>
</map:match>

Why I use resource? because it's doing more than just db-add-action and
I wouldn't want to duplicate the code all over sitemap...

Thanks,
 Joose

-- 
Joose Vettenranta <jo...@iki.fi>  GSM: 044 561 0270
* Always remember that you are unique.
                          Just like everyone else.*

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: modular database actions and passing params from sitemap

Posted by Javier del Gesu <de...@thinknola.com>.
* Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de> [2003-10-13 09:02]:
> On 13.Oct.2003 -- 11:05 AM, Joose Vettenranta wrote:

> > I didn't find info on the subject, to how to pass information to
> > AddAction from sitemap.
> > 
> > I have created resource, which I call with certain parameters. These
> > parameters I would like to add to database.. little like this:

> AFAIK there is no input module that has access to sitemap
> parameters. This was planned at some time but IIRC never happened.

> There is one alternative, though: use an action to store the
> parameters as request attributes and access them from the database
> descriptor. But, there is no such action ATM. However, it should be
> trivial to modify the SessionPropagatorAction to store as request
> attributes instead of session attributes. Or to make it
> configurable. Or to make a generic one that uses output modules ;-)

If someone were to do the above, would it be worth creating a patch?

-- 
Javier del Gesu - delgesu@thinknola.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: modular database actions and passing params from sitemap

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 13.Oct.2003 -- 11:05 AM, Joose Vettenranta wrote:
> Hi,
> 
> I didn't find info on the subject, to how to pass information to
> AddAction from sitemap.
> 
> I have created resource, which I call with certain parameters. These
> parameters I would like to add to database.. little like this:

AFAIK there is no input module that has access to sitemap
parameters. This was planned at some time but IIRC never happened.

There is one alternative, though: use an action to store the
parameters as request attributes and access them from the database
descriptor. But, there is no such action ATM. However, it should be
trivial to modify the SessionPropagatorAction to store as request
attributes instead of session attributes. Or to make it
configurable. Or to make a generic one that uses output modules ;-)

	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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org