cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Romayev <roma...@yahoo.com>
Subject Re: action vs transformer --> request attributes
Date Mon, 28 Jul 2003 14:15:21 GMT
Hi Geert,

Have you looked into input modules -- you can be using
sytax like:

<map:parameter name="username"
value="{request:username}"/>

Cheers,
-Alex

--- Geert Van Damme <geert.vandamme@vdab.be> wrote:
> 
> Hi,
> 
> I'm writing an action to make request attributes
> available to the sitemap (like the
> RequestParamAction does for request parameters)
> 
> Problem is in the action the attributes don't seem
> to be available ???
> Sitemap looks like follows :
> 
> 			 <map:act type="env">
> 				 <map:parameter
> name="accor.bestellingen.local.filename"
> value="localfilename"/>
> 
> 				 <map:transform type="filewriter">
> 					 <map:parameter name="filename"
> value="{localfilename}"/>
> 				 </map:transform>
> 			 </map:act>
> 
> 			 <map:act type="request-attributes">
> 					<map:transform type="ftp-put">
> 						<!-- required -->
> 						<map:parameter name="host" value="localhost"/>
> 						<map:parameter name="username" value="test"/>
> 						<map:parameter name="password" value="test"/>
> 						<map:parameter name="filenameFrom"
> value="{filename}"/>
> 						<map:parameter name="filenameTo"
> value="{filename}"/>
> 
> 						<!-- not required -->
> 						<map:parameter name="errortag" value="error"/>
> 					</map:transform>
> 			 </map:act>
> 
> The filewriter (= custom transformer, doesn't
> matter) puts an attribute on the request.
> In the ftp-put transformer, I can get back the
> correct value from the request attribute, but would
> rather have the action making the attribute(s)
> available to the sitemap.
> 
> Following code returns null in the action :
> 		HttpRequest request =
>
(HttpRequest)ObjectModelHelper.getRequest(objectModel);
> 		System.out.println ("attribute filename = " +
> request.getAttribute ("filename"));
> while the same code in the Transformer returns the
> (correct) previously set value...
> 
> Any ideas ??
> 
> 
> 
> 
>
---------------------------------------------------------------------
> 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


Mime
View raw message