Flash Scope Question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Flash Scope Question

Adam Stokar
Hi all,

I'm having a really weird issue having to do with setting a flash scope attribute.  The following code works:

getContext().getRequest().getSession().setAttribute(name,value);

But this code is not working:

FlashScope fs = FlashScope.getCurrent(getContext().getRequest(), true);

fs.put(name, value);

The first version allows me to access the attribute in my jsp, the second is saying the value is null. 

Can anyone think of why?  I've am using the same FS code in other ActionBeans and it's working fine.  Is there something in an ActionBean that might cause the FlashScope object to not work when called within it?

As always, any help is greatly appreciated.

Thanks!

Adam


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Flash Scope Question

Frank Pavageau-3
2012/10/25 Adam Stokar <[hidden email]>:

> I'm having a really weird issue having to do with setting a flash scope
> attribute.  The following code works:
>
> getContext().getRequest().getSession().setAttribute(name,value);
>
> But this code is not working:
>
> FlashScope fs = FlashScope.getCurrent(getContext().getRequest(), true);
>
> fs.put(name, value);
>
> The first version allows me to access the attribute in my jsp, the second is
> saying the value is null.

How do you access the attribute in the jsp?

> Can anyone think of why?  I've am using the same FS code in other
> ActionBeans and it's working fine.  Is there something in an ActionBean that
> might cause the FlashScope object to not work when called within it?

Frank

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Flash Scope Question

Adam Stokar
Standard EL. The name if the attribute is resultMessage:

${resultMessage}

It works in all of my ActionBeans but one.

On Thu, Oct 25, 2012 at 6:56 AM, Frank Pavageau <[hidden email]> wrote:
2012/10/25 Adam Stokar <[hidden email]>:
> I'm having a really weird issue having to do with setting a flash scope
> attribute.  The following code works:
>
> getContext().getRequest().getSession().setAttribute(name,value);
>
> But this code is not working:
>
> FlashScope fs = FlashScope.getCurrent(getContext().getRequest(), true);
>
> fs.put(name, value);
>
> The first version allows me to access the attribute in my jsp, the second is
> saying the value is null.

How do you access the attribute in the jsp?

> Can anyone think of why?  I've am using the same FS code in other
> ActionBeans and it's working fine.  Is there something in an ActionBean that
> might cause the FlashScope object to not work when called within it?

Frank

------------------------------------------------------------------------------
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users