Yes, perhaps i could do that ... i just had a lingering question in my mind "who" should know which step has been validated and which hasn't. No candidate stood out in the current model, it didn't seem right for the bean itself to know "which step i'm on" (or am i wrong there?), and the cascading solution kind of just fell into place. So for the moment, that's what i've got.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Dawson, Michael
Sent: Sunday, December 11, 2005 3:03 PM
To: [email protected]
Subject: RE: [CFCDev] How to pass a bean from page to page

Rather than have your code "cascade" in reverse multiple times, why not set a flag each time a form page is successfully validated?
 
Then, all you need to do is find the latest tab that was validated and then jump right there.
 
M!ke


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nando
Sent: Saturday, December 10, 2005 11:22 PM
To: [email protected]
Subject: RE: [CFCDev] How to pass a bean from page to page

Mike,
 
I'm just working on a multistep form now.
 
On the wizard question, what about instantiating your bean into session scope? That's what i'm doing.
 
On the Next=> button / multi step process with tabs, here's what i'm doing.
 
First for me was to recognize that the tab navigation allows users to go anywhere they want in the process. The Next=> button only allows forward movement to the next step. So they are different.
 
Second was to place a method in my bean that allows me to set the required fields at each step.
 
Third is to validate each step coming into it to make sure the required fields are set and valid in the bean. If it's not valid, the user is redirected back one step - and the required fields for that step are reset, validation is run, and if it's still not valid, the user is redirected back another step, the required fields are reset, validation method run ... etc. So in other words, if a user starts on step 1 and clicks the tab to step 5 without filling anything in, the validation cascades backwards and they land back on step 1 with the required fields highlighted in red (for instance).
 
A wee bit processing intensive to cascade the validation like that, but it won't happen so often. So it's ok by me.
 
Now, all that's left is to figure out how to submit the form when you click the next tab instead of clicking the Next=> button. If a user clicks any other tab besides the next tab in the sequence, they are just navigating and not really submitting. Sounds like a simple conditional on the tab that says essentially, "if i'm the next step, then i'll insert an in my <a href /> tag.
 
I'll give that a try - i didn't quite figure that part out yet.
 
 
ciao,
Nando
 
PS - whenever there's a form submission in the process, the required fields are reset, which means that the required fields for a submission at step 2 are the same as the required fields to enter into step 3.
 
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to