My thoughts below:
1) I don't like the term "flash" scope; it's too flashy (pun intended).
I do prefer dialog and "conversation" is just too long. "rollover" is
pretty good but requests do not roll over. What you really have is a
dialog/conversation and I believe those are the proper terms, and they
are precise to explain (in one word) it's scope and limitation. (As a
side note: if the term "flash" has been accepted as an industry
standard, I would use it.)
2) You may not want to implement this as a new scope. I went to Stripes'
website and poked around. I would prefer it that code would call
flash()-like inside the ActionForm which would flag the bean for the
Controller; the Controller on the way out would then add it to its
dialog management. I think this approach simplifies your design further
because it does not even add another scope. I also prefer this because,
given 1.x is a JSP-only architecture, we should not add new terms to it
and leave it to true JSP scopes.
ActionForward execute(...) {
// do stuff with form
form.flash(); // method name up for grabs
}
I am a strong believer the action should explicitly state the form
should persist for one more request. It shouldn't be automatic like in a
scope. If you are worried about multiple forms on a page, or other uses
of the form bean in request scope, I would then "flash" the form under a
different name: form.flash("myuniqueid"). I say this because the Struts
action mapping has another attribute @attribute:
From the DTD for [EMAIL PROTECTED]:
"Name of the request-scope or session-scope attribute that is used to
access our ActionForm bean, if it is other than the bean's specified
"name". Optional if "name" is specified, else not valid."
Paul
Michael Jouravlev wrote:
Anyone wants to share their thoughts on rollover scope?
http://wiki.apache.org/struts/RolloverScope
I was thinking on using Stripes approach, but I don't like to mange
URLs. Also, Stripes uses a timer to remove unused rollover scopes,
this does not seem very straightforward to me, from a user's point of
view. A user opens two windows then bam! in two minutes their content
is gone.
So I decided to go with the simplest implementation possible. It does
not allow to open several windows with the same-typed actionform, but
it is easy to understand and it works predictably.
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]