Andrew Madu wrote:
Hi Simone,
many thanks for your suggestions.
You're welcome :)

How so? This is what comes back to me:


What happens next? How do I get the value-returned into the if statement following the var bizdata line?
This is not simple. If you can manipulate the return url, try to have the value-returned passed as a parameter (like www.yoursite.com/continuation-id.continue?value-returned=X ) .

If you can't, then you will have to parse the URL by yourself inside the flow, and to do this you have to access the underlying JAVA request object, since the FOM object does not have methods to access the requestURI.

This is dirty, and YMMV, but it's done this way :

var objectmodel = Packages.org.apache.cocoon.components.CocoonComponentManager.getCurrentEnvironment().getObjectModel();
var jrequest = Packages.org.apache.cocoon.environment.ObjectModelHelper.getRequest(objectmodel);
var uri = jrequest.getRequestURI();
var value-returned = uri.substring(uri.lastIndexOf('/') + 1);

I don't know of a way to pass parameters from the sitemap to a continuation (you can pass them with <map:parameter inside a <map:call function, but i don't think they will work inside a <map:call continuation ).

OR you can try to rewrite the url, (a match that uses a map:redirect-to uri="{1}.continue?value-returned={2}") but it's getting dirtier and dirtier and don't know if it works well at all.

<map:match pattern="CCreturn/*/*">
   <map:redirect-to uri="{1}.continue?value-returned={2}"/>
</map:match>

Hope this helps,
Simone

--
Simone Gianni

Reply via email to