Use FFK to keep the user on the page until they fill out the data properly and then on a successful 'SUBMIT' you ask the state machine what the next page is.
Its nice in the example given, but I've tried it in the past w/ something very primitive like:
class longRegProcess: states = ['ste1','step2'....
def __init__(self):
if not hasattr(self,'currentStep'):
self.currentStep = 0 def run(self, data):
result = apply(eval('self.do%s' % states[self.currentStep]), data )
if result:
self.currentStep = self.currentStep +1def doStep1(self, data).
UserBean ub = getUser();
ub.setFirstName(getRequestParameter("firstName"));
ub.setLastName(getRequestParameter("lastName"));
ub.setAge(Integer.parseInt(this.getRequestParameter("age")));Not sure how this would work under a real load though, it was for an app w/ 10 concurrent users at most
-Aaron
Ian Sparks wrote:
You have seen this article linked from the daily python list.
www.freeroller.net/page/alexkrut
In it Alex describes using Cocoon and ATCT (http://www.velare.com/product/atct.htm) to provide procedural flow to a webapp.
This example in Java :
//will send the first registration page and wait until user submits information sendPageAndWait("/registration1.jsp", null); UserBean ub = getUser(); ub.setFirstName(getRequestParameter("firstName")); ub.setLastName(getRequestParameter("lastName")); ub.setAge(Integer.parseInt(this.getRequestParameter("age"))); //will send the second registration page and wait until user submits information sendPageAndWait("/registration2.jsp", null);
I have to say that I find the idea of this very attractive because it makes process flow very straightforward.
I wonder if there is a way of programming in this paradigm for Webware?
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss
------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
