cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <elad.mess...@eml-d.villa-bosch.de>
Subject AW: How to get the request path from a flowscript
Date Fri, 13 May 2005 14:14:07 GMT
Thanks, Jeroen for the quick reply. 
 
As far as I know the request path is part of the request Object. Just
like the request protocol, server , method etc.
I mean, one part of the HTTP request is its path. I think sometimes this
is referenced to as the "Context" of the request - but I am not sure.
 
I will pass it as you offer- with a parameter.
 
Thanks again
 
Elad
 


  _____  

Von: Jeroen Reijn [mailto:j.reijn@hippo.nl] 
Gesendet: Freitag, 13. Mai 2005 16:02
An: users@cocoon.apache.org
Betreff: RE: How to get the request path from a flowscript


Hi Elad,
 
in you case number 7 is not a request object.
 
What you can do is acces it by passing it from your sitemap:
 
<map:match pattern="*/*/*">
  <map:call function="test">
    <map:parameter name="id" value="{3}"/>
  </map:call>
</map:match>
 
>From your flowscript you can get your id like:
 
function test()
{
  var myId = cocoon.parameters["id"];
  print("current id: " + myId );
}
 
if you pass your id like a request parameter ( http://blabla/info?id=7 )
you can acces the request object:
 
then the map:parameter will be like 
 
<map:parameter name="id" value="{request-param:id}"/>
 
or you can call it from your flowscript with: cocoon.request.get("id");
 
You can find some more information about flow and the request object at:
 
http://cocoon.apache.org/2.1/userdocs/flow/api.html
 
Greetz,
 
Jeroen

	-----Original Message-----
	From: Messing, Elad [mailto:elad.messing@eml-d.villa-bosch.de]
	Posted At: Friday, May 13, 2005 3:33 PM
	Posted To: Cocoon User List
	Conversation: How to get the request path from a flowscript
	Subject: How to get the request path from a flowscript
	
	

	Hello All 
	        Newbie question. 
	        In my application, I use an object ID in the URL. I.E. -
http://blabla/info/7 <http://blabla/info/7>  
	        In my flowscript, I wish to use the ID (i.e. 7 ). 
	        How can I reference it from the cocoon.request object ? 
	        I searched for the answer, but I couldn't find it. Is it
a request attribute ? If so  - where can I see the full list of the
cocoon request attributes ?

	        Thank you !! 

	Elad Messing 
	Software Developer 
	European Media Laboratory GmbH 
	Schloss-Wolfsbrunnenweg 33 
	D-69118 Heidelberg 


Mime
View raw message