Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4649

Add an additional Ajax call listener point - before the call

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.0.0-beta2
    • 6.0.0-beta3
    • wicket
    • None

    Description

      We need to add another point in the Ajax call lifecycle that is called as early as possible.
      Until now we have the preconditions which are called in jQuery's beforeSend() and they may stop the call completely. If they pass then the dynamic extra parameters are evaluated and the 'before' handlers are executed.

      But in some cases one may need to execute some handler as early as possible. For example to transfer the value of some complex widget to <input type="hidden"> which will be serialized in jQuery's data with the default means. Using dynamic extra parameters will be able to do the same but the price will be much higher because the hidden field's value will be already in the data with an empty value and one should care to remove it before adding the dynamic value.

      So I suggest to move 'before' handlers at the top of Wicket.Ajax.doAjax() method and add a new one - 'beforeSend' which will do the same as 'before' handlers until now.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: