On a JSP to view an item I have a button to make an ajax call to delete
that item. Once that item is deleted, the javascript code forces a redirect
back to a main listing page.

What I want to do is have a message displayed on the listing page that the
item was deleted.

The Stripes action that controls the delete returns JSON via a custom
StreamingResolution instance (where content is the output from a JSON
builder)

        return new StreamingResolution("application/json", content) {
            public void stream(HttpServletResponse response)
            throws Exception {
                super.stream(response);
                response.setStatus(responseCode);
            }
        };

Before returning this I am making a call to add a new message :

        getContext().getMessages().add(new LocalizableMessage("blah"));

However, when because the redirect is happening via javascript (changing
window.location.href) rather than returning a RedirectResolution, the flash
scope and the message contained within isn't available.

How do I control the flash scope manually to achieve this?

Thanks

Chris
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to