cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Foster <jafos...@uwaterloo.ca>
Subject Re: continuation fear (was Re: [status & RT] design challenges)
Date Thu, 11 Apr 2002 02:08:00 GMT
Since I'm curious...

> In this flow, how do you implement a jump from page1 to 2 or 3 depending 
> on
> the user selection.
> To reuse Konstantin's example, say on the first page the user checks a box
> whether s/he has a car or not.
> Then page 2 collects information about the car, but its optional depending
> on the selection in 1.

function transaction()
{
   sendPage("start");

   beginTransaction();

   var carInfoDOM = null;
   var personInfoDOM = sendPage("GatherPersonInfo");
   var hasCar = personInfoDOM.XPathQuery("//parameters/has-car");

   if ( hasCar )
   {
     carInfoDOM = sendPage("page2");
   }

   var otherInfoDOM = sendPage("page3");

   WriteInfoToDatabase( personInfo, otherInfo, carInfo );

   commitTransaction();
   ...
   sendPage("finish");
}

Jason Foster


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


Mime
View raw message