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

Problem with OnEventHeaderItem and Wicket.Event.add

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.7.0
    • Fix Version/s: 6.8.0, 7.0.0-M1
    • Component/s: None
    • Labels:
      None

      Description

      OnEventHeaderItem uses function Wicket.Event.add from wicket-event-jquery.js to bind a script to specific event fired for a given DOM element.
      The function allows to specify the DOM element using its id. In this case the element is retrieved with standard function document.getElementById.
      However, this scenario fails when we apply it through OnEventHeaderItem because Wicket.Event.add is invoked before the DOM is ready (see attached quickstart). Therefore, we should modify the function to check for DOM-ready state (see attached patch).

        Attachments

        1. Quickstart.zip
          31 kB
          Andrea Del Bene
        2. WICKET-5181.patch
          2 kB
          Andrea Del Bene

          Issue Links

            Activity

              People

              • Assignee:
                mgrigorov Martin Grigorov
                Reporter:
                bitstorm Andrea Del Bene
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: