Example usage for org.apache.wicket.ajax AjaxEventBehavior onRequest

List of usage examples for org.apache.wicket.ajax AjaxEventBehavior onRequest

Introduction

In this page you can find the example usage for org.apache.wicket.ajax AjaxEventBehavior onRequest.

Prototype

@Override
    public final void onRequest() 

Source Link

Usage

From source file:org.wicketstuff.stateless.StatelessAjaxComponentsBehaviorsTest.java

License:Apache License

/**
 * Test method for {@link org.wicketstuff.stateless.components.StatelessAjaxFallbackLink#getStatelessHint()}.
 *///from   w w  w  .j  a  v a 2  s . co  m
@SuppressWarnings("unchecked")
@Test
public void testGetStatelessHint() {
    tester.startPage(HomePage.class);

    final HomePage page = (HomePage) tester.getLastRenderedPage();
    final StatelessAjaxFallbackLink<Object> l1 = (StatelessAjaxFallbackLink<Object>) page.get(2);

    assertTrue(l1.isStateless());

    l1.onClick();

    final List<? extends Behavior> behaviors = l1.getBehaviors();
    final AjaxEventBehavior behavior = (AjaxEventBehavior) behaviors.get(0);

    behavior.onRequest();
}