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.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;
}
}
" Untwist your mind, things are easy again": that's what I say during Cocoon trainings!