Re: [symfony-users] admin generator, change redirect target after create/update

2009-12-21 Thread Georg Gell
No, we can't. The exception is thrown after response::send() is executed :-( Am 20.12.2009 19:34, schrieb Alexandre Salomé: The exception is thrown by the redirect method, to stop any execution. So when the exception is thrown, you form was already saved. The real question is can we

Re: [symfony-users] admin generator, change redirect target after create/update

2009-12-20 Thread Georg Gell
Hi, no, this will not work, because I want to change the redirect after the form has been successfully processed, which means no exception to catch. Georg Am 19.12.2009 22:54, schrieb Alexandre Salomé: Hi, You can wrap the function in a try...catch block and do your stuff : public

Re: [symfony-users] admin generator, change redirect target after create/update

2009-12-20 Thread Alexandre Salomé
The exception is thrown by the redirect method, to stop any execution. So when the exception is thrown, you form was already saved. The real question is can we over-redirect ? 2009/12/20 Georg Gell geor...@have2.com Hi, no, this will not work, because I want to change the redirect after

[symfony-users] admin generator, change redirect target after create/update

2009-12-19 Thread Georg Gell
Hello, I would like to change the target of the redirect in an auto generated admin form, after the object is saved. This target is hard coded in processForm() in the base action. Is there an easier way then copying the whole processForm() method into the action, and then change only the target

Re: [symfony-users] admin generator, change redirect target after create/update

2009-12-19 Thread Alexandre Salomé
Hi, You can wrap the function in a try...catch block and do your stuff : public function processForm() { try { parent::processForm(); } catch (sfStopException $e) { $this-redirect(...); } } Not sure if this will work... Try and tell us. Alexandre 2009/12/19 Georg Gell