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.

- Jeff


On 3-Jun-08, at 9:56 AM, Bart McLeod wrote:

If you submit the form and validate it, your post data will still be in the form, while the page has been refreshed (there has been a round trip to the server upon form submission).

I did never use flashmessenger, but I do not see why it would not display its message when the user submits the form and thus refreshes the page?

Bart

Vincent schreef:
Hi,

In my project, the user now and then has to submit a form. Sometimes, there is an error with processing this form (e.g. the data couldn't be inserted into the database).

To communicate this to the user, I use the FlashMessenger action helper. However, the FlashMessenger won't display its messages until the next page load, which means I'll either have to refresh the page and lose the POST data, or preserve the POST data so I can populate the form with whatever the user just submitted, but lose the error message.

What would be the recommended way to have both?

Thanks,
--
Vincent

Reply via email to