I am using post-redirect-get pattern. My old solutions does generally
the same thing.
I am trying to integrate PEAR QuickForm as well. So far it is turning
out ok, needs quite a bit of work though.
In my solutions every step is basically a quickform (customizable
through templates, which I will make a more elegant solutionl ater).
When data is submited it is validated at each step. The next button
submits the data for that step. After validation I store the data
into a session array and redirect via get to the next step (determined
by the controller).
Beyond what QuickForm does already I am not explicitly storing cancel
data. I have however taken care of the resubmit problem by setting a
variable at the commit stage that says to clear the session data next
time the wizard is loaded.
I will see where this takes me the next couple of days.
On 5/19/06, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
>
> Hi John
>
> What you are proposing sounds great. My solution is not so flexible,
> and is contained entirely in the host controller.
>
> Are you going to use the Post-Redirect-Get approach? I have found this
> to work really well to eliminate back button and refresh issues that
> come along with forms.
>
> Other things to think about as you work (you may have already covered
> these of course :-) :
>
> - Browser cache expirery via response headers (to prevent forms being
> re-submitted)
> - Storing referrer data in "Cancel" situations so that you can return to
> the page the Cancel was called from if the user decides not to cancel
> - Using the Modified field or time stamp in a record to identify stale data
>
>
>
>
>
> John Zimmerman [gmail] wrote:
> > I haven't gotten too far on my Cake port of my 'wizard code' yet but
> > here is what my plan is.
> >
> > Maybe after we work out our own solutions we can compare and contrast
> > and see if we can't come up with something that can be re-used easily
> > and flexibly.
> >
> > Here goes...
> >
> > I created a new class called 'WizardController' that extends
> > AppController. I put my 'wizard_controller.php' file in the vendors
> > directory because that seemed the easiest to do at this point.
> >
> > So when I want to create a new 'Wizard' I create a new controller in the
> > app/controllers directory that has a call to vendor('wizard_controller')
> > at the top of the file. I then extend the wizard controller class.
> >
> > I am putting all of the supporting code for the wizard in the
> > WizardController class. Things I am including support for are the
> > following...
> >
> > * Define steps upon class creation
> > * Navigation
> > * Step Pre-Requisite checking
> > * Managing each steps data in a session
> > * Support for committing to database at the end of each step or at
> > the end of the wizard.
> > * Conditional choosing of the next step (or possibly delegate this
> > to the landing step)
> > * Probably some other items I can't think of right now.
> >
> >
> > Comments, ideas, criticism?
> >
> > On 5/19/06, *Langdon Stevenson* < [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >
> > Hi John
> >
> > The code is a work in progress just now, but I only have to add one
> > more
> > page (that actually handles some data, not just navigation) and it
> > should be right as an example.
> >
> > Will try to get it done tonight and post tomorrow.
> >
> > Turns out that this solution also runs faster than my previous mess
> > of a
> > controller, even with the redirect on each post.
> >
> > Regards,
> > Langdon
> >
> >
> > Jon Bennett wrote:
> > >>If anyone would like to know more, just let me know and I can
> > post some
> > >>code.
> > >
> > >
> > > yes please :)
> > >
> > > thanks,
> > >
> > > jon
> > >
> >
> > --
> > Linden Row Pty Ltd
> >
> > NSW : +61 2 8215 0570
> > Victoria : +61 3 9013 9423
> > Fax : +61 2 8215 0571
> >
> > Mobile : +61 416 118 037
> >
> > http://www.lindenrow.com.au
> >
> >
> >
> > >
>
> --
> Linden Row Pty Ltd
>
> NSW : +61 2 8215 0570
> Victoria : +61 3 9013 9423
> Fax : +61 2 8215 0571
>
> Mobile : +61 416 118 037
>
> http://www.lindenrow.com.au
> X-Google-Language: ENGLISH,ASCII-7-bit
> Received: by 10.54.63.18 with SMTP id l18mr113270wra;
> Fri, 19 May 2006 18:12:33 -0700 (PDT)
> Return-Path: <[EMAIL PROTECTED]>
> Received: from morpheus.kandos.infowrangler.com
> (bus-210-211-81-180.nsw.veridas.net [210.211.81.180])
> by mx.googlegroups.com with ESMTP id
> v11si115119cwb.2006.05.19.18.12.32;
> Fri, 19 May 2006 18:12:33 -0700 (PDT)
> Received-SPF: neutral (googlegroups.com: 210.211.81.180 is neither permitted
> nor denied by best guess record for domain of [EMAIL PROTECTED])
> Received: from [192.168.8.100] (unknown [192.168.8.100])
> by morpheus.kandos.infowrangler.com (Postfix) with ESMTP id 8AEEED8001
> for <[email protected]>; Sat, 20 May 2006 11:12:29 +1000 (EST)
> Message-ID: <[EMAIL PROTECTED]>
> Disposition-Notification-To: Langdon Stevenson <[EMAIL PROTECTED]>
> Date: Sat, 20 May 2006 11:12:26 +1000
> From: Langdon Stevenson <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Organization: Linden Row Pty Ltd
> User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
> X-Accept-Language: en-us, en
> Mime-Version: 1.0
> Content-Type: text/plain
> To: [email protected]
> Subject: Re: Multi-Step Form
> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> In-Reply-To: <[EMAIL PROTECTED]>
>
> Hi John
>
> What you are proposing sounds great. My solution is not so flexible,
> and is contained entirely in the host controller.
>
> Are you going to use the Post-Redirect-Get approach? I have found this
> to work really well to eliminate back button and refresh issues that
> come along with forms.
>
> Other things to think about as you work (you may have already covered
> these of course :-) :
>
> - Browser cache expirery via response headers (to prevent forms being
> re-submitted)
> - Storing referrer data in "Cancel" situations so that you can return to
> the page the Cancel was called from if the user decides not to cancel
> - Using the Modified field or time stamp in a record to identify stale data
>
>
>
>
>
> John Zimmerman [gmail] wrote:
> > I haven't gotten too far on my Cake port of my 'wizard code' yet but
> > here is what my plan is.
> >
> > Maybe after we work out our own solutions we can compare and contrast
> > and see if we can't come up with something that can be re-used easily
> > and flexibly.
> >
> > Here goes...
> >
> > I created a new class called 'WizardController' that extends
> > AppController. I put my 'wizard_controller.php' file in the vendors
> > directory because that seemed the easiest to do at this point.
> >
> > So when I want to create a new 'Wizard' I create a new controller in the
> > app/controllers directory that has a call to vendor('wizard_controller')
> > at the top of the file. I then extend the wizard controller class.
> >
> > I am putting all of the supporting code for the wizard in the
> > WizardController class. Things I am including support for are the
> > following...
> >
> > * Define steps upon class creation
> > * Navigation
> > * Step Pre-Requisite checking
> > * Managing each steps data in a session
> > * Support for committing to database at the end of each step or at
> > the end of the wizard.
> > * Conditional choosing of the next step (or possibly delegate this
> > to the landing step)
> > * Probably some other items I can't think of right now.
> >
> >
> > Comments, ideas, criticism?
> >
> > On 5/19/06, *Langdon Stevenson* < [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >
> > Hi John
> >
> > The code is a work in progress just now, but I only have to add one
> > more
> > page (that actually handles some data, not just navigation) and it
> > should be right as an example.
> >
> > Will try to get it done tonight and post tomorrow.
> >
> > Turns out that this solution also runs faster than my previous mess
> > of a
> > controller, even with the redirect on each post.
> >
> > Regards,
> > Langdon
> >
> >
> > Jon Bennett wrote:
> > >>If anyone would like to know more, just let me know and I can
> > post some
> > >>code.
> > >
> > >
> > > yes please :)
> > >
> > > thanks,
> > >
> > > jon
> > >
> >
> > --
> > Linden Row Pty Ltd
> >
> > NSW : +61 2 8215 0570
> > Victoria : +61 3 9013 9423
> > Fax : +61 2 8215 0571
> >
> > Mobile : +61 416 118 037
> >
> > http://www.lindenrow.com.au
> >
> >
> >
> > >
>
> --
> Linden Row Pty Ltd
>
> NSW : +61 2 8215 0570
> Victoria : +61 3 9013 9423
> Fax : +61 2 8215 0571
>
> Mobile : +61 416 118 037
>
> http://www.lindenrow.com.au
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---