Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Invalid
    • Affects Version/s: 1.3.2
    • Fix Version/s: 1.3.5
    • Component/s: wicket
    • Labels:
      None

      Description

      When precondition fail, the ajax indicator never gone and i can submit anything until i refresh the browser

        Activity

        Hide
        Matej Knopp added a comment -

        I don't think the we should invoke failure handler when precondition fails, because we don't invoke before handlers either.
        Something like this might fix the issue for you locally

        <script type="text/javascript">
        Wicket.Ajax.Request.prototype._done = Wicket.Ajax.Request.prototype.done;
        Wicket.Ajax.Request.prototype.done = function()

        { this.failure(); this._done(); }

        </script>

        Show
        Matej Knopp added a comment - I don't think the we should invoke failure handler when precondition fails, because we don't invoke before handlers either. Something like this might fix the issue for you locally <script type="text/javascript"> Wicket.Ajax.Request.prototype._done = Wicket.Ajax.Request.prototype.done; Wicket.Ajax.Request.prototype.done = function() { this.failure(); this._done(); } </script>
        Hide
        Matej Knopp added a comment - - edited

        Actually, the snippet should probably be something more like this

        <script type="text/javascript">
        Wicket.Ajax.Request.prototype._doGet = Wicket.Ajax.Request.prototype.doGet;
        Wicket.Ajax.Request.prototype.doGet = function() {
        var res = this._doGet()
        if (res == true)

        { this.failure(); }
        return res;
        }

        Wicket.Ajax.Request.prototype._doPost = Wicket.Ajax.Request.prototype.doPost;
        Wicket.Ajax.Request.prototype.doPost = function(body) {
        var res = this._doPost(body)
        if (res == true) { this.failure(); }

        return res;
        }
        </script>

        Show
        Matej Knopp added a comment - - edited Actually, the snippet should probably be something more like this <script type="text/javascript"> Wicket.Ajax.Request.prototype._doGet = Wicket.Ajax.Request.prototype.doGet; Wicket.Ajax.Request.prototype.doGet = function() { var res = this._doGet() if (res == true) { this.failure(); } return res; } Wicket.Ajax.Request.prototype._doPost = Wicket.Ajax.Request.prototype.doPost; Wicket.Ajax.Request.prototype.doPost = function(body) { var res = this._doPost(body) if (res == true) { this.failure(); } return res; } </script>
        Hide
        Matej Knopp added a comment -

        Another try

        <script type="text/javascript">
        Wicket.Ajax.Call.prototype._call = Wicket.Ajax.Call.prototype.call;
        Wicket.Ajax.Call.prototype.call = function() {
        var res = this._call()
        if (res == true)

        { Wicket.Ajax.invokePostCallHandlers(); this.successHandler(); }
        return res;
        }

        Wicket.Ajax.Call.prototype._post = Wicket.Ajax.Call.prototype.post;
        Wicket.Ajax.Call.prototype.post = function(body) {
        var res = this._post(body)
        if (res == true) { Wicket.Ajax.invokePostCallHandlers(); this.successHandler(); }

        return res;
        }

        </script>

        Show
        Matej Knopp added a comment - Another try <script type="text/javascript"> Wicket.Ajax.Call.prototype._call = Wicket.Ajax.Call.prototype.call; Wicket.Ajax.Call.prototype.call = function() { var res = this._call() if (res == true) { Wicket.Ajax.invokePostCallHandlers(); this.successHandler(); } return res; } Wicket.Ajax.Call.prototype._post = Wicket.Ajax.Call.prototype.post; Wicket.Ajax.Call.prototype.post = function(body) { var res = this._post(body) if (res == true) { Wicket.Ajax.invokePostCallHandlers(); this.successHandler(); } return res; } </script>
        Hide
        Eduardo Gambogi Cardoso added a comment -

        I and Matej found the cause of problem.Its happens when wicket generate inputs tag with id like "id".

        Show
        Eduardo Gambogi Cardoso added a comment - I and Matej found the cause of problem.Its happens when wicket generate inputs tag with id like "id".

          People

          • Assignee:
            Matej Knopp
            Reporter:
            Eduardo Gambogi Cardoso
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development