Wicket
  1. Wicket
  2. WICKET-4739

Complete handler called before success or failure handler (not after them, as documented)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Implemented
    • Affects Version/s: 6.0.0-beta3
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:
      None

      Description

      When registering an Ajax call listener, complete handler is called before success and failure handler. In documentation, the order is opposite.

      When registering the global Ajax call listeners, the order is correct (as documented). So both these cases are inconsistent - one follows the documentation, one does not.

        Activity

        Hide
        Martin Grigorov added a comment -

        This has been improved since beta3.
        Please try with 6.0.0.

        Show
        Martin Grigorov added a comment - This has been improved since beta3. Please try with 6.0.0.
        Hide
        Ota Hauptmann added a comment -

        You are right, it is correct in 6.0.0. Sorry for that, but I didn't noticed this version is released (not mentioned on wicket home page). So you can probably close this issue. But...

        There is still the problem, which led me to report this issue. This problem is, that 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.

        So is this a feature or bug? Is it known? I didn't find such issue, which is open. Should I report it? If it is necessary, I can attach quickstart example of this issue, it is quite trivial to simulate it.

        Thank you for your answer.

        Show
        Ota Hauptmann added a comment - You are right, it is correct in 6.0.0. Sorry for that, but I didn't noticed this version is released (not mentioned on wicket home page). So you can probably close this issue. But... There is still the problem, which led me to report this issue. This problem is, that 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. So is this a feature or bug? Is it known? I didn't find such issue, which is open. Should I report it? If it is necessary, I can attach quickstart example of this issue, it is quite trivial to simulate it. Thank you for your answer.
        Hide
        Martin Grigorov added a comment -

        Please create a separate issue with a quickstart.
        Thanks!

        Show
        Martin Grigorov added a comment - Please create a separate issue with a quickstart. Thanks!

          People

          • Assignee:
            Unassigned
            Reporter:
            Ota Hauptmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development