Re: Ajax Redirect and setFlash Messages

2008-11-05 Thread Adam Royle
Could you do the same with a setAction() inside the controller? (assuming it's the same controller) Adam On Nov 6, 6:54 am, jasonL <[EMAIL PROTECTED]> wrote: > Simple scenario: > > Top div contains ajaxed, paginated index of items.  Bottom div shows / > view when an item is selected from the ind

Re: Ajax Redirect and setFlash Messages

2008-11-05 Thread jasonL
Simple scenario: Top div contains ajaxed, paginated index of items. Bottom div shows / view when an item is selected from the index. You can choose to edit the item in the bottom div, it ajaxes in the /edit form. On susccessful submit, you redirect back to /view with flash saying 'Saved OK'.

Re: Ajax Redirect and setFlash Messages

2008-11-04 Thread Adam Royle
Why do you need to redirect inside an ajax request? I've never run into this requirement before. Cheers, Adam On Oct 15, 6:33 am, Julián Lastiri <[EMAIL PROTECTED]> wrote: > Well, i found that when i call redirect from an ajax request the > redirect is forwarded to the beforeRedirect method from

Re: Ajax Redirect and setFlash Messages

2008-11-04 Thread jasonL
I just upgraded to RC3 and ran into this exact problem. I've not found any way to get a layout to render after an Ajax redirect, except by not using RequestHandler. Did you find a solution? -Jason On Oct 14, 3:33 pm, Julián Lastiri <[EMAIL PROTECTED]> wrote: > Well, i found that when i callred

Re: Ajax Redirect and setFlash Messages

2008-10-14 Thread Julián Lastiri
Well, i found that when i call redirect from an ajax request the redirect is forwarded to the beforeRedirect method from RequestHandler Component. This method calls requestAction which sets bare in 1 and the dispatchers does the following if (!empty($this->params['bare'])) {

Re: Ajax Redirect and setFlash Messages

2008-10-14 Thread Julián Lastiri
When i use redirect from an ajax request the ajax.ctp is not rendered. I try calling setFlash with growl layout but doesn't work. I have a content div in my webpage. When i submit the form i save the data, then set a Flash message and redirect to the index. The index is loaded in the content di

Re: Ajax Redirect and setFlash Messages

2008-10-13 Thread Julián Lastiri
did it for both flash and validation.. > > Andras > > -Original Message- > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > > Of Julián Lastiri > Sent: Monday, October 13, 2008 2:11 PM > To: CakePHP > Subject: Ajax Redirect and setFlash Messages &g

RE: Ajax Redirect and setFlash Messages

2008-10-13 Thread Andras Kende
Lastiri Sent: Monday, October 13, 2008 2:11 PM To: CakePHP Subject: Ajax Redirect and setFlash Messages I'm using cakephp 1.2RC3 I want to show messages with setFlash method but when i use redirect the ajax.ctp layout is not rendered. I'm using this code to show messages with jGrowl inside m

Ajax Redirect and setFlash Messages

2008-10-13 Thread Julián Lastiri
I'm using cakephp 1.2RC3 I want to show messages with setFlash method but when i use redirect the ajax.ctp layout is not rendered. I'm using this code to show messages with jGrowl inside my ajax.ctp layout check('Message.flash')): ?> jQuery(document).ready(function(){ jQuery.jGrowl( "