silverstripe/sapphire — pull request #472 by mateusz (2012-05-21 00:32:24+00:00)
Title: ENHANCEMENT: rafactor the redirecting form submit to be more explicit

Asking people to remember and set a predefined class is not a good idea.

Follow up to https://github.com/silverstripe/sapphire/pull/464

@Ingo can you have a look here? I'm not sure what is the best way to do it - this solution seems right from the logical standpoint - we are explicitly requesting what we need. But the expected behaviour is configured on FormAction::create, which means it's quite hidden, and we can't react to user input by branching out to serving different things.

From the programmer's perspective, it would be easier to be able to specify what is served more like with a Director::redirect, where the decision is made at the end of the control flow. Like here: https://github.com/mateusz/sapphire/compare/os7299bis

What do you think?