An ajax behavior that is attached to a certain client-side (usually javascript) event, such as click, change, keydown, etc.
Example:
WebMarkupContainer div=new WebMarkupContainer(...); div.setOutputMarkupId(true); div.add(new AjaxEventBehavior("click") { protected void onEvent(AjaxRequestTarget target) { System.out.println("ajax here!"); } }
This behavior will be linked to the
click javascript event of the div WebMarkupContainer represents, and so anytime a user clicks this div the {@link #onEvent(AjaxRequestTarget)} of thebehavior is invoked.
@since 1.2
@author Igor Vaynberg (ivaynberg)
@see #onEvent(AjaxRequestTarget)