On 09/21/2010 10:52 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andre,

On 9/21/2010 3:15 PM, Andre Juffer wrote:
This provides an overview of the cocoon.request methods:

http://cocoon.apache.org/2.2/blocks/flowscript/1.0/1383_1_1.html

Okay, this looks like a HttpServletRequest object with a few more
methods (like get()). It's too bad the methods are poorly documented:
for instance, get() says that it gets an object from either the
attributes or parameters, but doesn't tell you what the rules are about
when it chooses parameter or attribute.

In either case, that parameter would almost certainly be a /request
parameter/, not a parameter to the function itself.

However, on the cocoon 2.1 site, there is the following:

http://cocoon.apache.org/2.1/userdocs/flow/sitemap.html

That seems to indicate that the proper way to pass parameters from the
sitemap to the flowscript function is like this:

<map:match pattern="*">
   <map:call function="equipmentHandler">
     <map:parameter name="method" value="{request:method}" />
   </map:call>
</map:match>

and read them like this:

function equipmentHandler()
{
     var request = cocoon.request;
     var method = cocoon.parameters.method;
...

Actually I already tried this before. Did not work either. But please read my next email I got it working!


See if that works for you.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyZDQcACgkQ9CaO5/Lv0PB50wCggBRhrbi7JSoDEvsTj4YnHRXf
CggAoJXr6TiRSQBznh131qQeqGJ91m4C
=svV1
-----END PGP SIGNATURE-----

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



--
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat                   | WWW: www.strubiocat.oulu.fi
NordProt                     | WWW: www.nordprot.org
Triacle Biocomputing         | WWW: www.triacle-bc.com

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

Reply via email to