FlashScope definitely smells of Macromedia.
Spring Webflow has several scopes in the virtual scope-scape between request 
scope and session scope, called ConversationScope and FlowScope.

Perhaps they are more to your taste?


Michael Jouravlev on 22/07/06 21:20, wrote:
Umm, dialog is not really the same thing:

http://shale.apache.org/features-dialog-manager.html
"Conceptually, a dialog can be thought of as a set of labelled states,
connected by labelled transitions between those states."

I am talking about something like this but more generic:

   /**
* <p>Removes any <code>ActionMessages</code> object stored in the session
    * under <code>Globals.MESSAGE_KEY</code> and
<code>Globals.ERROR_KEY</code>
    * if the messages' <code>isAccessed</code> method returns true.  This
    * allows messages to be stored in the session, display one time, and be
    * released here.</p>
    *
    * @param request The servlet request we are processing.
    * @param response The servlet response we are creating.
    *
    * @since Struts 1.2
    */
   protected void processCachedMessages(

       HttpServletRequest request,
       HttpServletResponse response) {

       HttpSession session = request.getSession(false);
       if (session == null) {
           return;
       }

       // Remove messages as needed
       ActionMessages messages =
           (ActionMessages) session.getAttribute(Globals.MESSAGE_KEY);

       if (messages != null) {
           if (messages.isAccessed()) {
               session.removeAttribute(Globals.MESSAGE_KEY);
           }
       }

       // Remove error messages as needed
       messages = (ActionMessages) session.getAttribute(Globals.ERROR_KEY);

       if (messages != null) {
           if (messages.isAccessed()) {
               session.removeAttribute(Globals.ERROR_KEY);
           }
       }

   }

Looking at the method's name, I might think of:

* Bean cache
* Cache scope

On 7/22/06, Paul Benedict <[EMAIL PROTECTED]> wrote:
Shale calls this a dialog. I prefer that name. The reason is, obviously, is a continuous dialog across multiple requests.

Michael Jouravlev <[EMAIL PROTECTED]> wrote: FlashScope is a feature of such frameworks like Tapestry or Stripes.
Behind the scenes, it uses session object and automatically retains
objects for the duration of this request and the subsequent request.
This scope object works best when redirect-after-post pattern is
utilized.

Struts has a rudimentary implementation of this tecnhique for handling
messages and errors. If a more generic FlashScope were created for
Struts, what do you call it:

* Drop scope -- this one sounds nice to me
* Autodiscard scope -- this explains that it is cleaned up automatically
* Roundtrip scope -- this explains what is it for
* Castaway scope
* Hold scope
* JettiScope (from "jettison", but may seem related to Jetty server)
* Just call it FlashScope like in Stripes
* Nah, FlashScope has Macromedia smell, should be something different,
like ____ (suggest yours)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to