Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.9.0
    • Fix Version/s: 6.10.0, 7.0.0-M1
    • Component/s: wicket
    • Labels:
      None

      Description

      WICKET-5234 didn't fix properly the problem described in it.
      It used the JavaScript that handles the event instead of registering the event.

        Activity

        Hide
        Martin Grigorov added a comment -

        A workaround that can be used until 6.10 is released is to use an extension of OnEventHeaderItem:

        class MyOnEventHeaderItem extends OnEventHeaderItem {

        @Override
        public CharSequence getJavaScript()
        {
        StringBuilder result = new StringBuilder();
        result.append("Wicket.Event.add(")
        .append(getTarget())
        .append(", \"")
        .append(getEvent())
        .append("\", function(event)

        { ") .append(javaScript) .append(";}

        );");
        return result;
        }
        }

        response.render(new MyOnEventHeaderItem(...));

        Show
        Martin Grigorov added a comment - A workaround that can be used until 6.10 is released is to use an extension of OnEventHeaderItem: class MyOnEventHeaderItem extends OnEventHeaderItem { @Override public CharSequence getJavaScript() { StringBuilder result = new StringBuilder(); result.append("Wicket.Event.add(") .append(getTarget()) .append(", \"") .append(getEvent()) .append("\", function(event) { ") .append(javaScript) .append(";} );"); return result; } } response.render(new MyOnEventHeaderItem(...));

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Martin Grigorov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development