> --- Simon Flack <sf at flacks.net> wrote:
>
> > Also, you may need to think about whether/how you can redirect from a
> > redirect (... and on...) and maintain state/user journey properly.
> >
>
After thinking on this i thought i couldn't see why anyone would do this. Why
not just use a wizard type thing. Then I thought Maybe this is a good way to
code a wizard.
Ridiculous example of a New DSL Account wizard
DSL::create_new {
. . .
return $r->redirect('/service_type/choose/?category=DSL', ) if
!$srvc_type;
# create DSL here
}
ServiceType::choose {
return $r->redirect('/customer/create_new', ) if !$customer;
. . .
}
Customer::create_new {
return $r->redirect('/address/create_new', ) if !$address;
. . .
}
Address::create_new {
return $r->redirect('/person/create_new', ) if !$person;
. . .
}
Person::create_new {
# Finally at begginning
. . .
}
Then pop redirects off as we go up. That's much easier than the last wizard i
wrote. One problem is a action after a redirect may have a hard time figuring
out whether to return from_redirect or not. I'm thinking $r->redirect may need
two args the goto path and the return_from path or just let actions figure it
out.
> >
> > _______________________________________________
> > maypole mailing list
> > maypole at lists.netthink.co.uk
> > http://lists.netthink.co.uk/listinfo/maypole
> >
>
>
> =====
> pjs
>
>
>
> __________________________________
> Do you Yahoo!?
> Meet the all-new My Yahoo! - Try it today!
> http://my.yahoo.com
>
>
>
> _______________________________________________
> maypole mailing list
> maypole at lists.netthink.co.uk
> http://lists.netthink.co.uk/listinfo/maypole
>
=====
pjs
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT