You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ota Hauptmann (JIRA)" <ji...@apache.org> on 2012/09/02 23:04:07 UTC

[jira] [Created] (WICKET-4741) Only complete handler (no success or failure handler) is called when Ajax link produces an exception

Ota Hauptmann created WICKET-4741:
-------------------------------------

             Summary: Only complete handler (no success or failure handler) is called when Ajax link produces an exception
                 Key: WICKET-4741
                 URL: https://issues.apache.org/jira/browse/WICKET-4741
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.0.0
            Reporter: Ota Hauptmann
         Attachments: failure-handler.zip

If there is an Ajax link which causes a redirect (if there is an exception or redirect to login page), only the complete handler is called. No call to the success handler (which wouldn't make much sense), but also no call to the failure handler. But as I said, the complete handler is called.

I understand the documentation in the way, that in all cases either success or failure handler should be called and then the complete handler. But in this situation no success or failure handler is called.

Attaching quickstart with window.alert javascripts as success, failure and complete handlers. The link produces WicketRuntimeException. Then, the complete popup is displayed, but not the failure handler. If you comment the exception, both success and complete handler are called.

--
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

[jira] [Updated] (WICKET-4741) Only complete handler (no success or failure handler) is called when Ajax link produces an exception

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

Ota Hauptmann updated WICKET-4741:
----------------------------------

    Comment: was deleted

(was: Quickstart example)
    
> Only complete handler (no success or failure handler) is called when Ajax link produces an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4741
>                 URL: https://issues.apache.org/jira/browse/WICKET-4741
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Ota Hauptmann
>         Attachments: failure-handler.zip
>
>
> If there is an Ajax link which causes a redirect (if there is an exception or redirect to login page), only the complete handler is called. No call to the success handler (which wouldn't make much sense), but also no call to the failure handler. But as I said, the complete handler is called.
> I understand the documentation in the way, that in all cases either success or failure handler should be called and then the complete handler. But in this situation no success or failure handler is called.
> Attaching quickstart with window.alert javascripts as success, failure and complete handlers. The link produces WicketRuntimeException. Then, the complete popup is displayed, but not the failure handler. If you comment the exception, both success and complete handler are called.

--
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

[jira] [Updated] (WICKET-4741) Only complete handler (no success or failure handler) is called when Ajax link produces an exception

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

Emond Papegaaij updated WICKET-4741:
------------------------------------

    Fix Version/s:     (was: 6.0.1)
                   6.1.0
    
> Only complete handler (no success or failure handler) is called when Ajax link produces an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4741
>                 URL: https://issues.apache.org/jira/browse/WICKET-4741
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Ota Hauptmann
>            Assignee: Martin Grigorov
>             Fix For: 6.1.0
>
>         Attachments: failure-handler.zip
>
>
> If there is an Ajax link which causes a redirect (if there is an exception or redirect to login page), only the complete handler is called. No call to the success handler (which wouldn't make much sense), but also no call to the failure handler. But as I said, the complete handler is called.
> I understand the documentation in the way, that in all cases either success or failure handler should be called and then the complete handler. But in this situation no success or failure handler is called.
> Attaching quickstart with window.alert javascripts as success, failure and complete handlers. The link produces WicketRuntimeException. Then, the complete popup is displayed, but not the failure handler. If you comment the exception, both success and complete handler are called.

--
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

[jira] [Commented] (WICKET-4741) Only complete handler (no success or failure handler) is called when Ajax link produces an exception

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

Martin Grigorov commented on WICKET-4741:
-----------------------------------------

The problem was a missing call to Wicket.Ajax.Call#success(). This is what Wicket 1.5.x does.

The next question is: Why success ? The onClick() handler just have thrown an exception. 
I think we should differentiate between success and failure.
                
> Only complete handler (no success or failure handler) is called when Ajax link produces an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4741
>                 URL: https://issues.apache.org/jira/browse/WICKET-4741
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Ota Hauptmann
>         Attachments: failure-handler.zip
>
>
> If there is an Ajax link which causes a redirect (if there is an exception or redirect to login page), only the complete handler is called. No call to the success handler (which wouldn't make much sense), but also no call to the failure handler. But as I said, the complete handler is called.
> I understand the documentation in the way, that in all cases either success or failure handler should be called and then the complete handler. But in this situation no success or failure handler is called.
> Attaching quickstart with window.alert javascripts as success, failure and complete handlers. The link produces WicketRuntimeException. Then, the complete popup is displayed, but not the failure handler. If you comment the exception, both success and complete handler are called.

--
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

[jira] [Resolved] (WICKET-4741) Only complete handler (no success or failure handler) is called when Ajax link produces an exception

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

Martin Grigorov resolved WICKET-4741.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.1
         Assignee: Martin Grigorov

The behavior whether to execute the failure handler or to make a redirect to the error page can be configured with:
org.apache.wicket.settings.IExceptionSettings#setAjaxErrorHandlingStrategy().

                
> Only complete handler (no success or failure handler) is called when Ajax link produces an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4741
>                 URL: https://issues.apache.org/jira/browse/WICKET-4741
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Ota Hauptmann
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1
>
>         Attachments: failure-handler.zip
>
>
> If there is an Ajax link which causes a redirect (if there is an exception or redirect to login page), only the complete handler is called. No call to the success handler (which wouldn't make much sense), but also no call to the failure handler. But as I said, the complete handler is called.
> I understand the documentation in the way, that in all cases either success or failure handler should be called and then the complete handler. But in this situation no success or failure handler is called.
> Attaching quickstart with window.alert javascripts as success, failure and complete handlers. The link produces WicketRuntimeException. Then, the complete popup is displayed, but not the failure handler. If you comment the exception, both success and complete handler are called.

--
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

[jira] [Updated] (WICKET-4741) Only complete handler (no success or failure handler) is called when Ajax link produces an exception

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

Ota Hauptmann updated WICKET-4741:
----------------------------------

    Attachment: failure-handler.zip

Quickstart example
                
> Only complete handler (no success or failure handler) is called when Ajax link produces an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4741
>                 URL: https://issues.apache.org/jira/browse/WICKET-4741
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Ota Hauptmann
>         Attachments: failure-handler.zip
>
>
> If there is an Ajax link which causes a redirect (if there is an exception or redirect to login page), only the complete handler is called. No call to the success handler (which wouldn't make much sense), but also no call to the failure handler. But as I said, the complete handler is called.
> I understand the documentation in the way, that in all cases either success or failure handler should be called and then the complete handler. But in this situation no success or failure handler is called.
> Attaching quickstart with window.alert javascripts as success, failure and complete handlers. The link produces WicketRuntimeException. Then, the complete popup is displayed, but not the failure handler. If you comment the exception, both success and complete handler are called.

--
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