« Cocoon news | Main | Cocoon PMC chair »

Flowscript fun

Marc shows how Cocoon's Flowscript makes things really easy. I have the same set of utilities, and even went further with dialogs:

var option = sendOptionDialogAndWait(
"Item " + item.name + " already exists. What do you want to do?",
["Overwrite", "Rename", "Discard"]
);
switch(option) {
case 0:
doOverwrite(data);
sendInfoDialog("Old item has been overwritten");
break;
case 1:
doRename(data);
break;
case 2:
if (confirm("You will loose your changes. Discard anyway?")) {
return;
}
}

If you read this with a Swing GUI in mind, this is no magic. But hey, it's a web application! Flowscript and its continuations allows people to build interactions they would have never thought being possible.

"Untwist your mind, things are easy again": that's what I say during Cocoon trainings!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)