I would like to do the following:
- I am displaying view1, with template1. There is a link to view2, rendering template2
- The user clicks the link
- When processing view2, an error occurs
- Now come the interesting part: I want to cancel rendering of view2, activate an error message, and display the previous view1/template1 (a kind of
redirection
, but not quite) But in view2 I do not know that I was coming from view1, and I also probably do not have the context that I had when view1 was rendered
How can I re-render view1, with the error message genarated in view2, so that the user the only new thing that sees is that error message? The full template1 should be rendered as before, including any form values that the user has entered.
This is similar to form validation, but would happen in the destination view instead of the form view.
Is this at all doable, or am I trying to do something completely impossible?