You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jan Winkler (JIRA)" <ji...@apache.org> on 2010/01/28 14:13:34 UTC

[jira] Created: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
-----------------------------------------------------------------------------------------------

                 Key: WICKET-2705
                 URL: https://issues.apache.org/jira/browse/WICKET-2705
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.7
         Environment: Sun Glassfish Enterpriser Server 2.1
            Reporter: Jan Winkler


Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.

WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.

Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831486#action_12831486 ] 

Martijn Dashorst commented on WICKET-2705:
------------------------------------------

AFAIK the patch is valid. It doesn't modify the scope, it only modifies that just the rendered feedback messages are cleared, and keeps the non-rendered messages for another time.

This concurrency issue is something we encountered as well: a normal form submission and an ajax event that are fired at the same time, where the ajax request is canceled with an EmptyAjaxRequestTarget (because normal page processing is already in progress). When the RC.detach() is processed, it clears all feedback messages.

Of course this shouldn't happen outside the synchronized block (currently the feedback messages are cleared outside the sync'd block), but with this patch threading issues should be less of an issue than before.

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Winkler updated WICKET-2705:
--------------------------------

    Affects Version/s:     (was: 1.3.7)
                       1.4.6

Affects 1.4.x as well.

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-2705:
----------------------------------

    Fix Version/s: 1.5-M3

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>            Assignee: Igor Vaynberg
>             Fix For: 1.5-M3
>
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Winkler updated WICKET-2705:
--------------------------------

    Attachment: feedbackbug.patch

Attached patch solves my problem.

WebSession.MESSAGES_FOR_COMPONENTS does not acccept() messages that haven't been rendered yet.

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.7
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-2705:
----------------------------------

    Fix Version/s:     (was: 1.5-M3)
                   1.6.0

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>            Assignee: Igor Vaynberg
>             Fix For: 1.6.0
>
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831536#action_12831536 ] 

Martijn Dashorst commented on WICKET-2705:
------------------------------------------

Another hurdle to take: FeedbackMessage#reporter is Component, and should be nulled between requests. 

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-2705:
-------------------------------------

    Assignee: Igor Vaynberg

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>            Assignee: Igor Vaynberg
>             Fix For: 1.5-M3
>
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Winkler updated WICKET-2705:
--------------------------------

    Attachment: feedbackbug.tgz

Testcase - maven project quickly hacked together.

1) Unpack, build, and deploy the project to appserver (I'm running on SGES 2.1)
2) Open the application (e.g. http://localhost:8080/feedbackbug-1.0-SNAPSHOT/)
3) DON'T fill in the text field, submit the form, its onError will hang for 10 secs.
4) In the 10 second meantime, click the 'clickme' button
5) Wait for the end of the 10 sec processing. No feedback messages are provided, even though one should be displayed.

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.7
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828099#action_12828099 ] 

Jan Winkler edited comment on WICKET-2705 at 2/1/10 12:57 PM:
--------------------------------------------------------------

The patch attached earlier applies to current trunk.

wicket/src/main/java (trunk)$ patch -p1 < feedbackbug.patch 
patching file org/apache/wicket/protocol/http/WebSession.java
Hunk #1 succeeded at 50 with fuzz 1 (offset 5 lines).



      was (Author: winkler):
    The patch attached earlier applies to current trunk.

wicket/src/main/java (trunk)$ patch -p1 < /home/prook/dl/feedbackbug.patch 
patching file org/apache/wicket/protocol/http/WebSession.java
Hunk #1 succeeded at 50 with fuzz 1 (offset 5 lines).


  
> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805911#action_12805911 ] 

Jan Winkler edited comment on WICKET-2705 at 1/28/10 1:53 PM:
--------------------------------------------------------------

Testcase - maven project quickly hacked together.

1) Unpack, build, and deploy the project to appserver (I'm running on SGES 2.1)
2) Open the application (e.g. http://localhost:8080/feedbackbug-1.0-SNAPSHOT/ )
3) DON'T fill in the text field, submit the form, its onError will hang for 10 secs.
4) In the 10 second meantime, click the 'clickme' button
5) Wait for the end of the 10 sec processing. No feedback messages are provided, even though one should be displayed.

      was (Author: winkler):
    Testcase - maven project quickly hacked together.

1) Unpack, build, and deploy the project to appserver (I'm running on SGES 2.1)
2) Open the application (e.g. http://localhost:8080/feedbackbug-1.0-SNAPSHOT/)
3) DON'T fill in the text field, submit the form, its onError will hang for 10 secs.
4) In the 10 second meantime, click the 'clickme' button
5) Wait for the end of the 10 sec processing. No feedback messages are provided, even though one should be displayed.
  
> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.7
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Winkler updated WICKET-2705:
--------------------------------

    Affects Version/s:     (was: 1.3.7)
                       1.4.6

Quick peek at wicket trunk shows that the same problem affects 1.4.

See http://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829927#action_12829927 ] 

Igor Vaynberg commented on WICKET-2705:
---------------------------------------

the proposed patch will not work. it basically makes all calls to component.info() equivalent to getsession().info() which are two completely different scopes. the patch breaks semantics and will affect processing of feedback messages during non-ajax requests.

i dont see an easy solution to this problem. in order to support it fully we have to store the messages with the page or possibly pagemap - which is the synchronization token for concurrent requests.

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst updated WICKET-2705:
-------------------------------------

    Attachment: patch.txt

Patch that fixes all tests and fixes the cleanup. Remaining issue: what to do about the modified semantics of cleanupFeedbackmessages()

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806653#action_12806653 ] 

Juergen Donnerstag commented on WICKET-2705:
--------------------------------------------

By now 1.3 issues only get fixed if is security releated or a big big bug. Please consider using 1.4 instead

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.7
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828099#action_12828099 ] 

Jan Winkler commented on WICKET-2705:
-------------------------------------

The patch attached earlier applies to current trunk.

wicket/src/main/java (trunk)$ patch -p1 < /home/prook/dl/feedbackbug.patch 
patching file org/apache/wicket/protocol/http/WebSession.java
Hunk #1 succeeded at 50 with fuzz 1 (offset 5 lines).



> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831513#action_12831513 ] 

Martijn Dashorst commented on WICKET-2705:
------------------------------------------

Problem is that this patch also kills manual cleanup of feedbackmessages.

When applied to branch/14x the patch causes a couple of testcase failures, most of which can be fixed by calling webSession.cleanupFeedbackmessages() in MockWebApplication#setupRequestAndResponse() (is intended behavior: all rendered feedbackmessages are cleared, just like in normal request processing).

The only test that fails is: WicketTesterTest#testToggleAjaxFormButton() and that is because the MockAjaxFormPage doesn't provide a feedbackpanel. Adding the feedbackpanel.

Session#cleanupFeedbackMessages() is documented as:

/**
 * Cleans up all rendered feedback messages and any unrendered, dangling feedback messages there may be left after that.
 */

But I think we should only clean up rendered feedback messages.


> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852786#action_12852786 ] 

Jan Winkler commented on WICKET-2705:
-------------------------------------

My patch indeed breaks things -- touching semantics of cleanupFeedbackmessages() is not a good idea as feedback messages also serve to signal FormComponent's validity. WIth my patch, FormComponents that failed to verify during an ajax request, are treated not valid until the error message is actually displayed to the user. This results in displaying error messages on submitting correctly filled in Form.

The problem I originally reported is exactly what Martijn said: "a normal form submission and an ajax event that are fired at the same time, where the ajax request is canceled with an EmptyAjaxRequestTarget (because normal page processing is already in progress). When the RC.detach() is processed, it clears all feedback messages."

Cancelling an ajax request because normal page processing is in progress seems like an intentional no-op, and it should be. Cleaning feedback messages is not a no-op though.


> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920857#action_12920857 ] 

Igor Vaynberg commented on WICKET-2705:
---------------------------------------

a proper solution to this will look something like this:

feedback messages are stored in component's metadata with the components
add new support for persistent feedback messages - these are not cleaned up after render

form components report their errors as persistent
form components clean their reported errors once validated
so form component workflow looks like this:

before validate - clear all reported errors
validate - reports persistent messages
onvalid - clear all reported errors
onerror - do nothing, messages stay until next validation or onvalid

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>            Assignee: Igor Vaynberg
>             Fix For: 1.6.0
>
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Winkler updated WICKET-2705:
--------------------------------

    Affects Version/s:     (was: 1.4.6)
                       1.3.7

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.7
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Jan Winkler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Winkler updated WICKET-2705:
--------------------------------

    Comment: was deleted

(was: Quick peek at wicket trunk shows that the same problem affects 1.4.

See http://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WebSession.java)

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>         Attachments: feedbackbug.patch, feedbackbug.tgz
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2705) Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920858#action_12920858 ] 

Igor Vaynberg commented on WICKET-2705:
---------------------------------------

the above solution is a little too much for 1.5 because we want to get it out asap, so scheduling for 1.6.0

> Feedback messages get cleaned up in AJAX request, thus never rendered and never visible to user
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2705
>                 URL: https://issues.apache.org/jira/browse/WICKET-2705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>         Environment: Sun Glassfish Enterpriser Server 2.1
>            Reporter: Jan Winkler
>            Assignee: Igor Vaynberg
>             Fix For: 1.6.0
>
>         Attachments: feedbackbug.patch, feedbackbug.tgz, patch.txt
>
>
> Consider a page containing a form and an AJAXy component (as in an AJAX link or a panel with AjaxSelfUpdatingTimerBehavior). The form contains code, that makes its processing take relatively long time, even when validation fails (let's say we forgot to fill in a requred field). The form gets submitted, and while it's processing, the AJAX component triggers a request (AJAX link gets clicked, or AjaxSelfUpdatingTimerBehavior kicks in). While the AJAX request gets served, cleanupFeedbackMessages() is called, wiping all feedback messages found by WebSession.MESSAGES_FOR_COMPONENTS filter.
> WebSession.MESSAGES_FOR_COMPONENTS implementation (or its usage in cleanupFeedbackMessages()) is a little bit fishy, as it accept()s messages, that haven't been rendered.
> Will add testcase.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.