On 6/3/08, Bart McLeod <[EMAIL PROTECTED]> wrote: > > > > Vincent schreef: > > > > On 6/3/08, Bart McLeod <[EMAIL PROTECTED]> wrote: > >> Hi Vincent, >> >> Why not redisplay the form if you want to keep the post data? I suppose >> some action will be needed from the part of the user if something went wrong >> while processing the form. So rollback and let the user try again. >> Otherwise, just store the post data in your session if you are using >> sessions anyway... >> > > I do want to redisplay the form, *with* the data he just submitted, but I > *also* want to display a message saying why the form is shown again. > > Why then not just use a <?= $this->error ?> in your view and set that to > reflect your message and empty on first load? >
That could indeed be done, however, I wanted a generic solution for all messages displayed to the user that would display the saved messages whenever a page is rendered. All the messages are currently in a separate response segment. I have a module that retrieves all messages from the flashmessenger and inserts them into that response segment, so I can't really do that from with the module that displays the form. Unless there's a good reason not to, I suppose I'll just cook up a subclass of the FlashMessenger. Bart > -- Vincent
