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

AjaxRequestTarget.get returns null within AjaxLink#onClick

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-M1
    • 1.5-M2.1
    • wicket
    • None

    Description

      Code:
      --------------------------
      ...
      new AjaxLink<Void>("link") {
      @Override
      public void onClick(AjaxRequestTarget target)

      { feedback("link clicked"); }

      }

      public void feedback(String message) {
      info(message);
      AjaxRequestTarget target = AjaxRequestTarget.get();
      if (target != null)

      { target.addComponent(get("feedback")); }

      }
      ...
      --------------------------

      In previous versions of Wicket this code worked.
      Now target is null and therefore the feedback panel is not re-rendered.
      Debugging AjaxRequestTarget.get shows that the active request handler is a ListenerInterfaceRequestHandler with an AjaxRequestTarget as next "scheduled" handler.

      Attachments

        1. lookup-art.patch
          0.6 kB
          Peter Ertl

        Activity

          People

            ivaynberg Igor Vaynberg
            daniel.soneira Daniel Soneira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: