On 8/29/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
On 8/29/06, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > Michael Jouravlev (JIRA) ha scritto: > > In addition to standard J2EE scopes (page for JSP, request, session and application) provide a new scope object that would hold data between requests. Similar facilities in Tapestry and Stripes are called FlashScope, Struts 1 will call it as Conversation Scope. > > > > Micheal > I know that's a bit out of "scope", but now I'm guessing if there is > space to incubate Scopes: > http://scopes.sourceforge.net/ > The "flash" scope is called "click" scope: > http://scopes.sourceforge.net/documentation/more-scopes/click-scope.html > I think it could be used among a large set of frameworks, including > Struts 1, Struts 2 and Shale. > What do you think? I need just one scope, so I don't think that bringing in a whole library just for one scope makes sense. Also, your library depends on Java5, while Struts 1 is built on Java 1.4. On the other hand, you already have done the work. Also, your idea of storing Click scope in the request and pushing it to session only between requests is better than mine idea of storing it in the session: less issues with garbage collection and the same ability to have multiple instances of, say, formbeans like with request scope. I have another suggestion: storing data right in the request object instead of having a dedicated scope object. Then, on redirection,
Please, if we're going to consider adding a flash / click / dialog / whatever scope, let's decouple it from redirection. Such an intermediate scope has potential uses that have nothing to do with redirection, so it needs to be workable even for those who happen to dislike redirects intensely. ;-) -- Martin Cooper pushing appropriate items to the session, using item's names. Thus,
the Click scope control object would store names instead of storing objects themselves. This way we would not have to do anything to update the search chain page->request->session->app for Struts tags and JSTL tags. For the tags, Click scope would be just a regular request scope. I would also prefer zero configuration, thus better integration with Struts. Therefore it would be great if you wrote a separate version specifically for Struts with full integration, or I can do it myself, taking your code as the basis. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]