On 15 Feb 2009, at 10:37, Craig Fairhurst wrote:
> You need executeWrite which is called for POST submits, handleError
> for errors and the standard getDefaultView
> It is through these methods in the Action that you determine what View
> to serve. If Input is to contain your form, the suggestion is instead
> of showing an error show the Input view instead so they don't need to
> go back and forth.
I've tried it two ways now:
- Call the original view (in my case called 'Comments') to show the
form again in case of error. This is by returning "Comments" from
handleWriteError in the action.
- Call the Error view, but within that view have:
$this->getLayer('content')->setTemplate('PostCommentsComments');
To load the correct template for the comment form.
In both cases I'm also calling executeRead within handleWriteError to
make sure the comments are loaded from the model. In both cases the
same thing happens: the form shows up, with the user-inputed data, but
no errors are shown in the form (and no class="error" is shown on any
of the input elements).
MIchal.
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users