title: Why is AjaxEventBehavior onEvent not called with Wicket 8 (worked ok with Wicket 7)?
body: <p>I migrated from Wicket 7 to Wicket 8. Now OnLoadBehavior does not work anymore. I need to show some hidden fields in the view using target.add() inside onEvent e.g.</p>
  <pre><code>if (showDateElement) {
     dateElement.setVisible(true);
     target.add(dateElement);
  }
  </code></pre>
  <p>Issue is that method onEvent is not called anymore as it was in previous version. No other code changes. This occurs in Firefox. Chrome seems to work most of the time, but not always. Is there some other way to do this same reliably in Wicket 8?</p>
  <p>I hope someone can help.</p>
  <pre><code>add(new OnLoadBehavior());
  
  private final class OnLoadBehavior extends AjaxEventBehavior {
  
      private OnLoadBehavior() {
          super(&quot;load&quot;);
          LOG.debug(&quot;OnLoadBehavior&quot;);
      }
  
      @Override
      protected void onEvent(final AjaxRequestTarget target) {
          LOG.debug(&quot;OnLoadBehavior onEvent&quot;);
      }
  }
  </code></pre>