Sylvain Wallez wrote:
<snip/>
Well, "backtracking" means "go back to a previous state and restart from there". And this is what continuations allow easily.
But when I use "go back" in a wizard I don't want to loose the entries already done in the second page. So simply calling the other continuation is not good in my opinion.
The flowscript allows you to implement any strategy you like for this.
Want to keep the values :
var form1 = new Form("form1.xml");
var form2 = new Form("form2.xml");
form1.showForm("view1.html");
form2.showForm("view2.html");If you display form2 and then go back to form1 (even with the browser back button), the values in form2 won't be lost.
Do not want to keep the values:
var form1 = new Form("form1.xml");
form1.showForm("view1.html");
var form2 = new Form("form2.xml");
form2.showForm("view2.html");In this case, since the "form2" variable is created _after_ form1 is displayed, it is created anew each time you exit form1.
This is the magic of continuations ;-)
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com
