[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    Re: Parameters
From:       Christian Haul <haul () dvs1 ! informatik ! tu-darmstadt ! de>
Date:       2003-09-18 7:26:01
[Download RAW message or body]

On 17.Sep.2003 -- 11:07 AM, jcplerm wrote:
> I implemented an action to set an attribute on the request object which looks like:
> 
>    <map:act type="SetRequestAttributeAction">
>                 <map:parameter name="requestAttributeName" value="attr1"/>
>                 <map:parameter name="requestAttributeValue" value="1000"/>
>             ...
>     </map:act>
> 
> Can output modules somehow be used to do the same thing as above?
> Are there any other ways/ideas of doing it?

There is an output module that writes to request attributes. However,
output modules are not directly accessible from the sitemap. One could
think of a generic action like the one you wrote that sets attributes
using output modules. That way this action could be used to set
e.g. session attributes and more (thinking, would it make sense to
have an response output module then, perhaps based on JXPath?)

The "TestAction.java" in src/samples/org/apache/cocoon/acting/modular/
might be useful as a blueprint for such an action, although it
focusses on testing input modules it does use output modules as well.
Just mind that output modules may require a final "commit()" before
data is actually placed in the designated store.

	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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic