from the alternative ways of passing data around, can i say that using flash option; the data only lived on until the next page? after that any link to other page the flashed data will invalidated unless you set it again? on another side using Application State, there's no other way to kill the session unless to invalidate it. but the again, to invalidate the ASO, other objects which also bound to ASO will be wiped out as well am i correct?
wesley Thiago H. de Paula Figueiredo wrote: > > Em Tue, 30 Sep 2008 14:58:03 -0300, Alex Kotchnev <[EMAIL PROTECTED]> > escreveu: > >> I didn't quite realize that a value in a page persisted in flash scope >> was not accessible to other pages ( although now that you mention it, it >> seems to make sense) . > > It makes sense when you remember the mess that the use of HttpSession > attributes was . . . It was always difficult to figure out who set a given > attribute, and you had to be careful to not reuse the same attribute name > in different pages . . . Argh. I love @Persist. :) > >> That's an interesting fact that seems to significantly >> reduce the usefulness of flash scope, as in a "traditional" web app, >> this is the perfect way to pass short lived data between two different >> pages. > > Don't forget that Tapestry uses redirect-after-post by default, so many > times you @Persist("flash") something because you do not want that > something to remain in the user session. > > My applications tend to have a lot of @Persist("flash") and a few @Persist > (almost all them storing search parameters used to fill a Grid). > >> However, it appears that using a combination of setters and flash scope >> should still work, correct ? e.g. >> >> @Persist(value="flash") >> User user >> >> public void setUser(User u) { >> this.user = u >> } > > Yes, it would. ;) That's exactly one of its uses: > > class Page2 { > @Persist("flash") > private YourData data; > // getters and setters > } > > class Page1 { > @Inject > private Page2 page2; > > public Object onActionFromSomething() { > ... > page2.setData(data); > return page2; > } > } > > Thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://n2.nabble.com/pass-list-of-string-object-between-Tapestry-pages-tp1128055p1131583.html Sent from the Tapestry Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]