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.

Of course, I *could* save the form data in a session, but it's not really
what I consider a clean solution.

On 6/3/08, Jeffrey Sambells <[EMAIL PROTECTED]> wrote:
>
> I think the issue is around adding to the flash messenger and then
> retrieving the message at the end of the same request (no refresh). I'm
> having a similar issue where we use the flash messenger to store messages
> and then try to retrieve them during the same request. Sometimes the
> application needs to re-direct and sometimes not so the flash messenger
> seemed the appropriate place to store them but often they don't show up
> until the following page load. I haven't had time to loot into it though.


Don't they *always* show up only after the following page load?

I suppose it would be possible to have FlashMessenger also keep a copy of
the messages in a property in the current request and, when requested,
return that if it's not found in the session. However, this seems like a
common enough use case that I shouldn't have to subclass the FlashMessenger
for it, that's why I'm asking...

- Jeff
>
>


-- 
Vincent

Reply via email to