You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Bertrand Guay-Paquet (JIRA)" <ji...@apache.org> on 2013/05/01 15:58:15 UTC

[jira] [Commented] (WICKET-5165) Session should be bound when adding messages to it

    [ https://issues.apache.org/jira/browse/WICKET-5165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13646589#comment-13646589 ] 

Bertrand Guay-Paquet commented on WICKET-5165:
----------------------------------------------

Here's an idea that might work without concurrent request cycles:

Session gets a new flag called "wasBoundForMessage" to indicate that the current session was bound during this request specifically for a session message. That flag is reset anytime the bind() method is called for another reason. At the end of a request, if wasBoundForMessage is true and the response is rendered in the same request (no redirect), the Session is "unbound".

Like I said, I know this doesn't work as is, but I'm posting it in case the concept sparks another idea.
                
> Session should be bound when adding messages to it
> --------------------------------------------------
>
>                 Key: WICKET-5165
>                 URL: https://issues.apache.org/jira/browse/WICKET-5165
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.7.0
>            Reporter: Bertrand Guay-Paquet
>              Labels: session
>
> When using the Sessions info(), error() and success() methods, and the session is temporary, the messages can be dropped silently. This happens when on stateless pages and a redirect happens in the same request during which a session message is added.
> The fix for this could be to make sure the session is bound and call Session#bind() automatically when a session message is added.
> Email thread:
> http://wicket-users.markmail.org/thread/zd72s4gwnlp5d7ch

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira