cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volkm@r" <>
Subject Re: "redirect-to" result of a transformation
Date Mon, 04 Apr 2005 16:51:52 GMT
Adam Ratcliffe wrote:
> You could do this from flowscript. Basically what you'd need to do is process
> the request in the flow layer and use the cocoon object's processPipelineTo()
> method to retrieve the output of the pipeline and redirect from there.
> <map:match pattern="myPattern">
> 	<map:call function="processLinks"/>
> </map:match>
> function processLinks() {
> 	var uri = cocoon.request.getParameter("Quelle");
> 	var output = new;
> 	cocoon.processPipelineTo(uri, output);
> 	var redirectUri = output.toString();
> 	cocoon.redirectTo(redirectUri);
> }
> Adam

I've followed your proposal and now I'm getting this error message:

An Error Occurred

at processLinks (file:/path/to/script/redirect.flow, Line 4): expected a instead of null

"file:/path/to/script/redirect.flow", line 4: uncaught JavaScript 
exception: at processLinks (file:/path/to/script/redirect.flow, Line 4): 
expected a instead of null

cause: org.mozilla.javascript.JavaScriptException: at processLinks 
(file:/path/to/script/redirect.flow, Line 4): expected a instead of null

Obviously the function "processPipelineTo" is missing one of three 
arguments. I'm completely new to flowscripts and I'd like to learn how 
to solve this.

How do I get the missing argument?

And where can I put the xpath expression extracting the URL from the 
webpage  fetched by "request.getParameter"?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message