Probably you might use requestAction in your articles 'view' function
requestAction('/comments/add');
requestAction('/comments/index'');
and, in the comments add function, use redirect() to go back to the
Article page ... (just like the default delete() function) , using
getReferrer(); from the requestHandler component...
spark
On 6/21/06, .. <[EMAIL PROTECTED]> wrote:
>
> Hello All,
> Pardon me if this has been asked before.
>
> After experimenting with the Blog tutorial I added a comments model -
> the association etc worked fine and I can show all the comments on the
> same page as the post.
>
> Next I added a Form for adding comments in the same view as post using
> the html helper. Everything works great if there are no data validation
> errors in the comment and the comment gets added and the Comment/add
> action redirects the user to the post page. However I cannot figure out
> that if any of the comment fields do not validate - how to show the
> same post page with the comment form filled in with the submitted data
> and errors. (like it happens in most blogs)
>
> I know there can be work around of showing a differnt page when an
> error occurs OR I use a pop-up window for comment OR I use AJAX OR
> worse I add an addComment action to my Posts controller (ugh)
>
> But I do not want any of these work arounds.
>
> At tips in the right direction preferably with code samples would be
> appreciated
>
> Thanks in advance
> ..
>
>
> >
>
--
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---