I found the existence of the method getChildren() in the continuation object.
For a moment I thought I had found my answer...
But I can't find out how to use it in my jexl file.
And there is no usage example in the samples ...
I tried something like that but it doesn't work :
<jx:set var="contsize">${cocoon.continuation.getChlidren().length}</jx:set>
<jx:set var="mycont">${cocoon.continuation.getChildren()[contsize]}</jx:set>
${mycont.id}
Any lead please ?
Philippe
-----Message d'origine-----
De : Philippe LAPLANCHE
Envoyé : jeudi 6 avril 2006 15:16
À : [email protected]
Objet : ${cocoon.continuation.id} gives bad continuation id
I already asked this on [EMAIL PROTECTED] I had no answer. Since
my problem looks like a cocoon bug and since I'm completely stuck here,
I'm asking you the same question.
I use cocoon 2.1.8 on windows XP with tomcat 5.5 and sun jdk 1.5.
In my flowscript function. I display a form then I send a result page. I
use an infinite loop to handle pagination. In that loop, I call
sendPageAndWait.
In my jexl file used to display the results I want to use
${cocoon.continuation.id} but I think I get the id of the continuation
that was generated for the form instead of the one generated when
calling sendPageAndWait.
Here's what I put in my jexl file :
<a href="${cocoon.continuation.id}?skipResults=10">next page</a>
When I click on "next page" I'm brought back to the form with a
validation error. So I understand that I got the wrong continuation id
Here's the code of my flowscript function :
function findNumber() {
var yellowPagesForm = new Form("forms/yellowPagesForm.xml");
var model = yellowPagesForm.getModel();
yellowPagesForm.showForm("yellowPagesForm.cforms");
var local = cocoon.createPageLocal();
local.skipResults = 0;
local.ypResult = findLinesInYellowPages(model.query);
while(true) {
cocoon.sendPageAndWait("yellowPagesResult.jx",{"local" :
local});
local.skipResults =
parseInt(cocoon.request.getParameter("skipResults"));
}
}
Philippe
PS. Is there a nice document that explains exactly how continuations
work and how they should be used?
In the docs on cocoon.apache.org, it's said that sendPage() doesn't
generate a continuation, whereas it actually does.... And here I'm lost
again with continuations.
And I'm also afraid that continuations might consume a LOT of memory. Is
there a way to tell that each user shouldn't have more than 5
continuations or something like that?
PSS. When will 2.1.9 be available ?
---------------------------------------------------------------------------------------
Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail.
Aucun virus connu a ce jour par nos services n'a ete detecte.