cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Bielza <nicolas.bie...@gmail.com>
Subject how to remove a continuation object ?
Date Fri, 19 Nov 2004 17:43:54 GMT
Hi,

I have several pages in my webapp that are using WebContinuations, the
continuation-id is placed in a hidden form field and the sitemap looks
like this:


		<map:match pattern="titi">
			<map:match type="request-parameter" pattern="continuation-id">
				<map:call continuation="{1}"/>
			</map:match>
			<map:call function="titi"/>
		</map:match>

		<map:match pattern="toto">
			<map:match type="request-parameter" pattern="continuation-id">
				<map:call continuation="{1}"/>
			</map:match>
			<map:call function="toto"/>
		</map:match>

Now, function toto is like:

function toto()
{
    var form = new Form("forms/toto.xml");

    form.showForm("toto-display-pipeline");

    var model = form.getModel();
		
cocoon.sendPageAndWait("toto-confirm");
				
		if(getParam("confirmation") == "true") {
			cocoon.sendPage("toto-end");
		} else {
			cocoon.sendPage("titi"); // this causes an infinite loop
		}
}

Now the problem is that the matcher for "titi" in the sitemap invokes
the continuation that was created in function toto(), causing an
infinite loop.
I tried to invalidate the continuation but then I get an
InvalidContinuationException. What I'd like to do is to remove the
Continuation object from the context (or from the request ?) so that
the request-parameter matcher won't see it.
Does anyone know of a way to do so ?

Thanks,
Nicolas.

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


Mime
View raw message