List of usage examples for org.apache.wicket.ajax AjaxEventBehavior getEvent
public String getEvent()
From source file:com.aplombee.navigator.MoreLabelTest.java
License:Apache License
@Test(groups = { "wicketTests" }) public void newOnClickBehavior() { IModel model = Mockito.mock(IModel.class); ItemsNavigatorBase navigator = Mockito.mock(ItemsNavigatorBase.class); MoreLabel label = new MoreLabel("id", model, navigator); AjaxEventBehavior behavior = label.newOnClickBehavior(); Assert.assertEquals(behavior.getEvent(), "click"); }
From source file:org.artifactory.common.wicket.component.checkbox.styled.StyledCheckbox.java
License:Open Source License
private Component internalAdd(Behavior behavior) { if (AjaxEventBehavior.class.isAssignableFrom(behavior.getClass())) { AjaxEventBehavior ajaxEventBehavior = (AjaxEventBehavior) behavior; button.add(new DelegateEventBehavior(ajaxEventBehavior.getEvent(), checkbox)); checkbox.add(ajaxEventBehavior); return this; }/*from ww w.java2s. co m*/ return super.add(behavior); }
From source file:org.artifactory.common.wicket.component.radio.styled.StyledRadio.java
License:Open Source License
private Component internalAdd(Behavior behavior) { if (AjaxEventBehavior.class.isAssignableFrom(behavior.getClass())) { AjaxEventBehavior ajaxEventBehavior = (AjaxEventBehavior) behavior; button.add(new DelegateEventBehavior(ajaxEventBehavior.getEvent(), radio)); radio.add(ajaxEventBehavior);//from w w w.j a v a2 s . c o m return this; } return super.add(behavior); }
From source file:org.opensingular.form.wicket.helpers.STypeTester.java
License:Apache License
private List<String> collectEvents(AjaxEventBehavior behavior) { List<String> events = new ArrayList<>(); String behaviorEvent = behavior.getEvent(); String[] behaviorEventNames = Strings.split(behaviorEvent, ' '); for (String behaviorEventName : behaviorEventNames) { if (behaviorEventName.startsWith("on")) { behaviorEventName = behaviorEventName.substring(2); }//from w ww. j a va 2 s . com events.add(behaviorEventName); } return events; }