cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: cforms + flow contination problem
Date Wed, 06 Oct 2004 20:48:45 GMT
Surely you can do the following (add a while loop with a boolean 'confirmed' variable? 

Won't that work?

Upayavira

function registration() {
	
	var form = new Form("forms/registration.xml");

var confirmed = false;
while (!confirmed) {
	form.showForm("registration-display-pipeline");

	var model = form.getModel();
	
	var helper = new Helper();
	var timestamp = helper.timestamp();
     
   var person = new Person(model.username, model.password, model.email,
model.firstname, model.sirname, model.address, model.zip, model.country,
model.birthday, model.phone, timestamp);
    
			
	var bizData = person.Object2bizData();

// show data again and ask if everything is OK, if not go back
	
	var form_confirm = new Form("forms/registration_confirm.xml");
	form_confirm.showForm("registration-confirm-pipeline", bizData);
confirmed = form.getChild("confirmed");
}

// save data to db
	person.create();

	cocoon.sendPage("registration-success-pipeline", person);
}



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


Mime
View raw message