Sylvain Wallez wrote:

Christopher Oliver wrote:

Vadim Gritsenko wrote:
<snip>

AFAIK, that is already the behavior. If you invalidate the parent, it invalidates all of its children.



Yes, if it has them. But the problem here is that he has got no children. You have to stick all the different web continuations trees generated by showForm calls into the root, and only then you can invalidate them.


Other option is to maintain ArrayList of all continuations, which is not that pretty.

Vadim



The current version of showForm creates contnuations unnecessarily (at least at the moment).



How can we reduce the number of continuation? By reusing a continuation created the first time the form is shown?


Sylvain

Sorry, I just looked at woody2.js and it actually doesn't do things this way (woody.js did - btw, why have both?). In woody2.js showForm() simply calls cocoon.sendPageAndWait() in a loop. It seems to return the first continuation created. I guess if you save this one, then you can invalidate the whole sequence using it:

var k = form1.showForm(...);
form2.showForm();
form3.showForm();
k.invalidate();  // should blast all continuations up to this point

Anyway, I don't think addChild() is needed, or if it is, then to me that indicates a usability bug in the overall design (I don't think the user should have to manage continuations explicitly like that).

Regards,

Chris



Reply via email to