Uhh according to that page : An example of flash scope usage is non-error messages functionality in Stripes. The ActionBeanContext has a getMessages() method that returns a list to which messages may be added. This list is stored in flash scope so that the messages are available to the current request (should the ActionBean forward to a page) and in the next request (should the ActionBean redirect to a page)
This is exactly what I am using. On Tue, Oct 16, 2012 at 4:46 AM, Frank Pavageau <[email protected]> wrote: > 2012/10/16 Chris Cheshire <[email protected]>: >> I have all my JSPs fronted by action beans with a view() resolution. >> Generally if errors happen in processing (other than field >> validation), I use LocalizableMessages and store them in the messages >> collection in the stripes context. If the action forwards to its own >> JSP, the messages tag renders them properly. >> >> If the action redirects to another action, the messages never display. >> The URL comes back with the flash scope id (__fsk=...) but the >> messages from the previous action aren't there. >> >> >> This works - the message(s) render on JSP2 >> >> Class 1 : >> >> public Resolution view() { >> /** some processing **/ >> getContext().getMessages().add(new >> LocalizableMessage("key.in.StripesResources.properties")); >> return new ForwardResolution(Class2); >> } >> >> Class 2 : >> >> public Resolution view() { >> /** some other processing that does not touch the context messages **/ >> return new ForwardResolution("/path/to/JSP2"); >> } >> >> >> If I change the ForwardResolution in Class1 to a RedirectResolution, >> the messages do not render on JSP2. Am I misunderstanding how the >> flash scope works, or is something broken/misconfigured somewhere? > > That's not how the flash scope is used, cf. > http://stripesframework.org/display/stripes/State+Management#StateManagement-RedirectafterPost > for an example. You're currently adding messages to the request scope, > not the flash scope, which explains why they're lost after a redirect. > > Frank > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
