You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2005/09/24 22:31:40 UTC
SOLVED (Re: How to set request attribute from the sitemap?)
Well, mystery solved.
Turns out I was setting up the PropagatorAction correctly — it was just
that the default configuration of RequestAttributeOutputModule wasn't
doing what I expected. With sitemap log level set to DEBUG, I could
see that the propagator was working right. I added some scaffolding in
my flowscript to print out all the request attributes, and that led me
to track down the <key-prefix> thing which has a crazy default of
OutputModule.ROLE. Adding an empty <key-prefix/> solved my problem.
—ml—
On Sep 24, 2005, at 9:42 AM, Mark Lundquist wrote:
>
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org