[TYPO3-mvc] Flash Messages get persisted among page hits
Stephan Reuther - development.IT
s.reuther at internet-chemnitz.de
Mon Apr 26 15:56:25 CEST 2010
Zitat von "Thomas Thasmo Deinhamer" <thasmo at gmail.com>:
> Stephan maybe meant the count of pages to live with TTL.
> Like you set it to '1' so it will only be displayed on
> the next page, if you set '2' it will be displayed on
> the next two pages - or after two redirects etc.
You are right :)
>>
>> I don't think that a time span makes sense. It will make more sense
>> to flag individual messages
>> whether to persist or not. Or maybe even mark them with a "context"
>> (eg the page) so that even if
>> the message is persisted it will only show up if the context is the
>> same. ie there has been no
>> redirect to another page. Note that the "context" would allow
>> another page to show the message if it
>> has the same "context" as the page that issued the message.
>>
After rethinking the topic I think Masi is right. A TTL thing is
a bit too randomly. If TTL is set to 3 you do not really know, on which
page the user is located after threee looong clicks.
So this context specific approach seems to be more controllable by
you as programmer.
But Christine mentioned a good point:
>>> Building up flash messages seems to usually be a problem for us
>>> only when errors are
>>> occurring in my code, and I have to change something in the code hit back
>>> and submit again.
If I use FlashMessage technology as it is implemented I have to care about
the rendering of the FlashMessage on the page, my actual action (where
i add the
FlashMessage to the FlashMessageContainer) redirects/forwards to.
if there are no errors in the code no *ghost*FlashMessages will be persisted.
Stephan
More information about the TYPO3-project-typo3v4mvc
mailing list