cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SANSONE, AARON M [Non-Pharmacia/1000]" <aaron.m.sans...@monsanto.com>
Subject RE: Placing Request Values on the Session...
Date Tue, 16 Oct 2001 15:23:05 GMT
That's the trick.  Thanks Chris!

-----Original Message-----
From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de]
Sent: Tuesday, October 16, 2001 1:46 AM
To: cocoon-users@xml.apache.org
Subject: Re: Placing Request Values on the Session...


On 15.Oct.2001 -- 04:20 PM, SANSONE, AARON M [Non-Pharmacia/1000] wrote:
> I need a simple way to place posted values from a form on the user session
> for later use.  I thought that the SessionPropagatorAction was the way to
> go.  Is anyone using the SessionPropagatorAction successfully in this
> manner?
> 
> I have a form that posts three values (text input "varOne", "varTwo" and
> "varThree") to a matching pattern in sitemap.xmap which then calls the
> session-propagator action to (theoretically) place posted the values on
the
> session:
> 
> <map:match pattern="getCAParms">
>   <map:act type="session-propagator">
>     <map:parameter name="varOne" value="{varOne}"/>
>     <map:parameter name="varTwo" value="{varTwo}"/>
>     <map:parameter name="varThree" value="{varThree}"/>
>   </map:act>				
> </map:match>
> 
> Obviously this doesn't do what I would have expected it to.
> 
> I must be going about this in the wrong way, does anyone have a better
> solution?  

Aaron,

what you're missing here is, that {varOne} can't be substituted with
the desired value because Cocoon doesn't know about it. Put another
action around the session-propagator, namely the "RequestParamAction"
and set "parameters" to "true". Thus

   <map:match pattern="getCAParms">

     <map:act type="request">
       <map:parameter name="parameters" value="true"/>
       <map:parameter name="default.varOne" value="some default value for
varOne"/>

       <map:act type="session-propagator">
	 <map:parameter name="varOne" value="{varOne}"/>
	 <map:parameter name="varTwo" value="{varTwo}"/>
	 <map:parameter name="varThree" value="{varThree}"/>
       </map:act>

     </map:act>

   </map:match>

HTH

	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

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message