Ferreteria/v0.5/stash: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
==Notes==
==Notes==
The message text gets submitted to {{l/ver/class|caPageContent}}->AddText(), which presumably adds it to the output buffer that the redirect process fetches from to toss over to the stash.
The message text gets submitted to {{l/ver/class|caPageContent}}->AddText(), which presumably adds it to the output buffer that the redirect process fetches from to toss over to the stash.
It looks like the stashed content is ''supposed'' to be retrieved by {{l/ver/class|caPageContent}}->OnFigure()

Revision as of 20:34, 3 December 2022

Ferreteria 0.5: message stashing

About

Sometimes a process emits output right before a redirect needs to happen -- most commonly in response to a form submission (we do a redirect right after processing POST input in order to prevent accidental data resubmissions).

For this reason, the redirect system checks for output (which would/should not yet have been sent to the screen anyway), saves it in the user's browser via the stash cookie, and then does the redirect. The page object should always look for any stashed content to display, adding it at the top of any content it adds to the render. (This last part is currently not working, 2022-12-03.)

Notes

The message text gets submitted to caPageContent->AddText(), which presumably adds it to the output buffer that the redirect process fetches from to toss over to the stash.

It looks like the stashed content is supposed to be retrieved by caPageContent->OnFigure()