Hello,
I have found another solution for problems in the documentation of cocoon (but i have not tried it out ;-))
You can also reach previous continuations by using the getParent() function in the template:
<form action="$continuation.getParent().id" >
I hope it helps!
Dirk Gronert
Hello,
I've in an application something like a cycle of an order which is divided into 3 forms. Now I have to implement a back button which shows the previous page with his state. Does someone know an easy and elegant way to implement this? I've read something with createPageLocal(), but does this also work with sendview()?
Examples of my source you find below.
Thanks
Mike
//source in flowscript
function order( args_p ) {
jxform( "orderForm", "order", null, null, "request"); }
function orderForm( form_p )
{
var model = form_p.getModel();
do { form_p.sendView( "orderPage1.form", validateOrderPage1Form ); } while( !model.displayNextPage );
do {
form_p.sendView( "orderPage2.form", validateOrderPage2Form );
}
while( !model.displayNextPage );
do {
form_p.sendView( "orderPage3.form", validateOrderPage3Form );
}
while( !model.displayNextPage );
doTheOrder();
if ( model.errorCode == 0 ) { form_p.sendView( "oK.form", validateOKForm ); } else { form_p.sendView( "noK.form", validateNOKForm ); } form_p.finish(); }
function validateOrderPage1Form( form_p ){ //validateOrderPage2Form & //validateOrderPage3Form are equal var model = form_p.getModel();
var action = form_p.getSubmitId();
if ( action == "next" ) {
if (doSomeValidation()) {
model.displayNextPage = true; }
else {
model.displayNextPage = false;
}
}
<!-- source of the form -->
<xf:submit id="next" continuation="forward">
<xf:label><i18n:text i18n:catalogue="buttons">NEXT</i18n:text></xf:label>
</xf:submit>
______________ ______________ ______________
QuickLine WebMail - http://www.quick-line.ch
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]