Wicket
  1. Wicket
  2. WICKET-5039

Manual invocation of FunctionsExecutor#notify() is broken

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 6.4.0
    • Fix Version/s: 6.7.0
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      any

      Description

      We are having problems on Wicket 1.4.x with and "AJAX function" processEvaluation... and I see the code is practically the same at 6.x. So, let's bring the subject to the list...

      Our problem is that after evaluating some expressions with errors, screen "freezes" because post-call handlers are not called. Problem seems to be related to the code.

      // test if the javascript is in form of identifier|code
      // if it is, we allow for letting the javascript decide when the rest of processing will continue
      // by invoking identifier();
      var res = text.match(new RegExp("^([a-z|A-Z_][a-z|A-Z|0-9_])\\|((.|
      n)
      )$"));

      if (res !== null) {
      var f = jQuery.noop;
      text = "f = function(" + res[1] + ")

      {" + res[2] + "}

      ;";

      try

      { // do the evaluation eval(text); f(notify); } catch (exception) { Wicket.Log.error("Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: " + exception + ", text: " + text); }

      }


      In case of error. Shouldn't it be

      try { // do the evaluation eval(text); f(notify); }

      catch (exception)

      { Wicket.Log.error("Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: " + exception + ", text: " + text); notify(); }

      So that next steps in processing get called. The above solves or freezing problem in case of error

      1. wicket5039.tar.gz
        21 kB
        Ernesto Reinaldo Barreiro
      2. WICKET-5039.patch
        0.6 kB
        Ernesto Reinaldo Barreiro

        Issue Links

          Activity

          Tobias Haupt made changes -
          Link This issue is related to WICKET-5243 [ WICKET-5243 ]
          Martin Grigorov made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 6.7.0 [ 12323964 ]
          Resolution Fixed [ 1 ]
          Martin Grigorov made changes -
          Affects Version/s 6.4.0 [ 12323450 ]
          Affects Version/s 1.4.21 [ 12320171 ]
          Affects Version/s 1.5.8 [ 12321662 ]
          Affects Version/s 6.5.0 [ 12323540 ]
          Martin Grigorov made changes -
          Summary ajax post call handlers might not get called because of failure on AJAX processEvaluation function Manual invocation of FunctionsExecutor#notify() is broken
          Martin Grigorov made changes -
          Link This issue is broken by WICKET-4881 [ WICKET-4881 ]
          Martin Grigorov made changes -
          Assignee Martin Grigorov [ mgrigorov ]
          Ernesto Reinaldo Barreiro made changes -
          Attachment wicket5039.tar.gz [ 12569793 ]
          Ernesto Reinaldo Barreiro made changes -
          Summary ajax post call handlers might not get called because of failure on problems with processEvaluation function ajax post call handlers might not get called because of failure on AJAX processEvaluation function
          Ernesto Reinaldo Barreiro made changes -
          Field Original Value New Value
          Attachment WICKET-5039.patch [ 12569186 ]
          Ernesto Reinaldo Barreiro created issue -

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Ernesto Reinaldo Barreiro
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development