cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject How to set request attribute from the sitemap?
Date Sat, 24 Sep 2005 16:42:38 GMT

Hi everyone,

Here's the sitch (w/ Cocoon 2.1.7, standard sitemap components)...

I need to set a request attribute in one pipeline, so that a later 
(after internal forwarding) pipeline can use it (access it using the 
input module).

I have a continuation-based "wizard" flow that needs this request 
attribute set in each pipeline that it forwards to.  I was setting the 
request attribute in flowscript at the beginning of the flow.  That 
worked great for the first continuation.  The continuation handler 
resumes the flow context, but since it's a new request I lose the old 
request attributes.  Note, there is no way to kludge around this in 
flow without modifying the flowscript Form object, since once we go 
into the form validation loop, we may span several continuations before 
getting back out again.

I tried using the PropagatorAction, trying to figure out from the 
javadoc how to set it up.  Here's what I tried:

     <map:action
         name="request-attr-propagator"
         src="org.apache.cocoon.acting.PropagatorAction"
         logger="sitemap.action.request-attr-propagator"
       >
       <output-module name="request-attr"/>
     </map:action>

and in the pipeline:

         <map:act type="request-attr-propagator">
           <map:parameter name="ui-mode" value="{1}"/>
         </map:act>

...but it doesn't seem to be working (no errors, the request attribute 
just isn't getting set).  Am I doing it wrong?

The other confusing thing is that there is also a 
SessionPropagatorAction... but the example configuration given in the 
PropagatorAction javadoc is for a "session-propagator".

As always, any help will be gratefully appreciated :-)
—ml—


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


Mime
View raw message