Ugo Cei wrote:

Stephan Coboos wrote:

In the match section I'm calling the resource 'main' which is calling a flowscript function itself. But if I do that this way I don't have access to the request params within the flowscript! How do I activate passing request parameters thru resources to a flowscript?


Did you try the following?

function main() {

var x = cocoon.request.parameterName;

// or

var x = cocoon.request.getParameter("name");

}


Yes, of course! Because if I don't redirect to a resource in the sitemap and call the function directly all works well. The "error" is very easy reproducable:

Simply change this pipeline ...

<map:match pattern="">
   <map:call function="myFunction"/>
</map:match>

... to this one ...

...
<map:resource name="myResource">
   <map:call function="myFunction"/>
</map:resource>
...
<map:match pattern="">
   <map:call resource="myResource"/>
</map:match>
...

In the first one cocoon.request... returns the request parameter correctly in the flowscript. In the second one, nothing will be returned.

What should I do?

Thank you.

Regards
Stephan


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to