Web Oriented Object Framework

User Guide (Version 0.5b4)

Woof!
User Guide (Version 0.5b4)

The flash object

On occasion, there may be a need to pass data between action methods invoked by consecutive requests from a client. For example, input validation failures in an action method may invoke a HTTP redirect to a error display page. The error display method or template would need to have access to details about the error cause, parameters and so on.

It would not be difficult for the application to accomplish this through the session object. However, this is a common enough requirement that Woof! supports it directly through the flash object (which in fact is built on top of session). Applications can use the standard Map interfaces to store key value pairs into the flash object. These values will live for the duration of the very next client request and be automatically deleted when that request is completely processed.

The error handling example in the Using the flash section of Quick start illustrates use of this facility.