You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ja...@internet.lu on 2004/01/10 11:26:54 UTC

[FLOW -Woody] wizard style attempt

Hi,

Using Cocoon 2.1.4-dev.

my attempt to write a wizard style sequence in Woody is (roughly) as below. Can anyone confirm I'm on the right track, or if I'll get performance problems later, for instance?

function mywizard{


var f1 = form.load("form1_model.xml");
var f2 = form.load("form2_model.xml");
var f3 = form.load("form3_model.xml");

var step=1;

while(step){

	switch(step){

		case 1:
			f1.showForm;
			step=2;
		case 2:
			f2.showForm;
			if (submitId = previous){
				step=1;
			}else{
				step=3;
			}
		case 3:
			f3.showForm;
			if (submitId = previous){
				step=2;
			}else{
				step=null;
				cocoon.sendPage("success");
			}

	}

}	

}


Problem: from success page, if user hits Back button on browser, the continuation is still alive. How can I fix this?
Qu: I've noticed elsewhere syntax such as 

var k = form.showForm...
k.invalidate();

what exactly does this do?

TIA for any help
James

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org