Hi Brent!
Another option is to not use a loop. See between lines:
Brent Johnson dijo:
> I've got a page where the user can modify something (the title of an
> XML document in this case). Here's what I'm doing in the flowscript:
>
> function showLayoutListPage() {
> var page = cocoon.parameters.page;
>
> if (isLoggedIn()) {
>
while (true) { // remove this line
> cocoon.sendPageAndWait("content/" + page + ".html", {
> "page" : page, "user" : cocoon.session.getAttribute("user"), "layouts"
> : getLayoutList() });
>
> var action = cocoon.request.get("doit");
> var filename = cocoon.request.get("filename");
>
> if (action == "setTitle") {
> // set the title for the layout
> var layout = getLayoutByFilename(filename);
> layout.setTitle(cocoon.request.get("title"));
> layout.save();
> }
} // remove this line
// Add a sendPage to the initial link
cocoon.sendPage("my_initial_link");
>
> } else {
> cocoon.redirectTo("/public/index.html");
> }
> }
That way you can avoid the loop. Also you can invalidate the continuation
once it is over.
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]